Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5553295d authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Add logging utility methods"

parents ed32c842 e4aa95e3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ include $(CLEAR_VARS)
ifeq ($(USE_OPENGL_RENDERER),true)
	LOCAL_SRC_FILES := \
		utils/Blur.cpp \
		utils/GLUtils.cpp \
		utils/SortedListImpl.cpp \
		thread/TaskManager.cpp \
		font/CacheTexture.cpp \
+2 −2
Original line number Diff line number Diff line
@@ -482,8 +482,8 @@ void Matrix4::decomposeScale(float& sx, float& sy) const {
    sy = copysignf(sqrtf(len), data[mat4::kScaleY]);
}

void Matrix4::dump() const {
    ALOGD("Matrix4[simple=%d, type=0x%x", isSimple(), getType());
void Matrix4::dump(const char* label) const {
    ALOGD("%s[simple=%d, type=0x%x", label ? label : "Matrix4", isSimple(), getType());
    ALOGD("  %f %f %f %f", data[kScaleX], data[kSkewX], data[8], data[kTranslateX]);
    ALOGD("  %f %f %f %f", data[kSkewY], data[kScaleY], data[9], data[kTranslateY]);
    ALOGD("  %f %f %f %f", data[2], data[6], data[kScaleZ], data[kTranslateZ]);
+1 −1
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ public:

    void decomposeScale(float& sx, float& sy) const;

    void dump() const;
    void dump(const char* label = NULL) const;

    static const Matrix4& identity();

+2 −18
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include "PathTessellator.h"
#include "Properties.h"
#include "ShadowTessellator.h"
#include "utils/GLUtils.h"
#include "Vector.h"
#include "VertexBuffer.h"

@@ -296,24 +297,7 @@ void OpenGLRenderer::finish() {

    if (!suppressErrorChecks()) {
#if DEBUG_OPENGL
        GLenum status = GL_NO_ERROR;
        while ((status = glGetError()) != GL_NO_ERROR) {
            ALOGD("GL error from OpenGLRenderer: 0x%x", status);
            switch (status) {
                case GL_INVALID_ENUM:
                    ALOGE("  GL_INVALID_ENUM");
                    break;
                case GL_INVALID_VALUE:
                    ALOGE("  GL_INVALID_VALUE");
                    break;
                case GL_INVALID_OPERATION:
                    ALOGE("  GL_INVALID_OPERATION");
                    break;
                case GL_OUT_OF_MEMORY:
                    ALOGE("  Out of memory!");
                    break;
            }
        }
        GLUtils::dumpGLErrors();
#endif

#if DEBUG_MEMORY_USAGE
+6 −2
Original line number Diff line number Diff line
@@ -175,6 +175,10 @@ public:
        bottom += dy;
    }

    void inset(float delta) {
        outset(-delta);
    }

    void outset(float delta) {
        left -= delta;
        top -= delta;
@@ -230,8 +234,8 @@ public:
        bottom = ceilf(bottom);
    }

    void dump() const {
        ALOGD("Rect[l=%f t=%f r=%f b=%f]", left, top, right, bottom);
    void dump(const char* label) const {
        ALOGD("%s[l=%f t=%f r=%f b=%f]", label ? label : "Rect", left, top, right, bottom);
    }

private:
Loading