Loading libs/hwui/Android.mk +9 −4 Original line number Diff line number Diff line Loading @@ -40,14 +40,19 @@ ifeq ($(USE_OPENGL_RENDERER),true) external/skia/include/utils LOCAL_CFLAGS += -DUSE_OPENGL_RENDERER -DGL_GLEXT_PROTOTYPES LOCAL_CFLAGS += -fvisibility=hidden # Uncomment the following line to use `perf` # LOCAL_CFLAGS += -fno-omit-frame-pointer -marm -mapcs LOCAL_MODULE_CLASS := SHARED_LIBRARIES LOCAL_SHARED_LIBRARIES := libcutils libutils libGLESv2 libskia libui LOCAL_MODULE := libhwui LOCAL_MODULE_TAGS := optional ifndef HWUI_COMPILE_SYMBOLS LOCAL_CFLAGS += -fvisibility=hidden endif ifdef HWUI_COMPILE_FOR_PERF LOCAL_CFLAGS += -fno-omit-frame-pointer -marm -mapcs endif include $(BUILD_SHARED_LIBRARY) include $(call all-makefiles-under,$(LOCAL_PATH)) Loading libs/hwui/Caches.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ void Caches::activeTexture(GLuint textureUnit) { } } void Caches::setScissor(GLint x, GLint y, GLint width, GLint height) { bool Caches::setScissor(GLint x, GLint y, GLint width, GLint height) { if (scissorEnabled && (x != mScissorX || y != mScissorY || width != mScissorWidth || height != mScissorHeight)) { Loading @@ -368,21 +368,28 @@ void Caches::setScissor(GLint x, GLint y, GLint width, GLint height) { mScissorY = y; mScissorWidth = width; mScissorHeight = height; return true; } return false; } void Caches::enableScissor() { bool Caches::enableScissor() { if (!scissorEnabled) { glEnable(GL_SCISSOR_TEST); scissorEnabled = true; return true; } return false; } void Caches::disableScissor() { bool Caches::disableScissor() { if (scissorEnabled) { glDisable(GL_SCISSOR_TEST); scissorEnabled = false; return true; } return false; } void Caches::setScissorEnabled(bool enabled) { Loading libs/hwui/Caches.h +3 −3 Original line number Diff line number Diff line Loading @@ -197,15 +197,15 @@ public: /** * Sets the scissor for the current surface. */ void setScissor(GLint x, GLint y, GLint width, GLint height); bool setScissor(GLint x, GLint y, GLint width, GLint height); /** * Resets the scissor state. */ void resetScissor(); void enableScissor(); void disableScissor(); bool enableScissor(); bool disableScissor(); void setScissorEnabled(bool enabled); /** Loading libs/hwui/Debug.h +3 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,9 @@ // Turn on to dump display list state #define DEBUG_DISPLAY_LIST 0 // Turn on to insert an event marker for each display list op #define DEBUG_DISPLAY_LIST_OPS_AS_EVENTS 0 #if DEBUG_INIT #define INIT_LOGD(...) ALOGD(__VA_ARGS__) #else Loading libs/hwui/DisplayListRenderer.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -852,11 +852,13 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag #endif renderer.startMark(mName.string()); int restoreTo = renderer.save(SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag); DISPLAY_LIST_LOGD("%s%s %d %d", indent, "Save", SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag, restoreTo); setViewProperties(renderer, level); if (renderer.quickReject(0, 0, mWidth, mHeight)) { if (renderer.quickRejectNoScissor(0, 0, mWidth, mHeight)) { DISPLAY_LIST_LOGD("%s%s %d", (char*) indent, "RestoreToCount", restoreTo); renderer.restoreToCount(restoreTo); renderer.endMark(); Loading @@ -865,6 +867,7 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag DisplayListLogBuffer& logBuffer = DisplayListLogBuffer::getInstance(); int saveCount = renderer.getSaveCount() - 1; while (!mReader.eof()) { int op = mReader.readInt(); if (op & OP_MAY_BE_SKIPPED_MASK) { Loading @@ -880,6 +883,10 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag } logBuffer.writeCommand(level, op); #if DEBUG_DISPLAY_LIST_OPS_AS_EVENTS Caches::getInstance().eventMark(strlen(OP_NAMES[op]), OP_NAMES[op]); #endif switch (op) { case DrawGLFunction: { Functor *functor = (Functor *) getInt(); Loading Loading
libs/hwui/Android.mk +9 −4 Original line number Diff line number Diff line Loading @@ -40,14 +40,19 @@ ifeq ($(USE_OPENGL_RENDERER),true) external/skia/include/utils LOCAL_CFLAGS += -DUSE_OPENGL_RENDERER -DGL_GLEXT_PROTOTYPES LOCAL_CFLAGS += -fvisibility=hidden # Uncomment the following line to use `perf` # LOCAL_CFLAGS += -fno-omit-frame-pointer -marm -mapcs LOCAL_MODULE_CLASS := SHARED_LIBRARIES LOCAL_SHARED_LIBRARIES := libcutils libutils libGLESv2 libskia libui LOCAL_MODULE := libhwui LOCAL_MODULE_TAGS := optional ifndef HWUI_COMPILE_SYMBOLS LOCAL_CFLAGS += -fvisibility=hidden endif ifdef HWUI_COMPILE_FOR_PERF LOCAL_CFLAGS += -fno-omit-frame-pointer -marm -mapcs endif include $(BUILD_SHARED_LIBRARY) include $(call all-makefiles-under,$(LOCAL_PATH)) Loading
libs/hwui/Caches.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ void Caches::activeTexture(GLuint textureUnit) { } } void Caches::setScissor(GLint x, GLint y, GLint width, GLint height) { bool Caches::setScissor(GLint x, GLint y, GLint width, GLint height) { if (scissorEnabled && (x != mScissorX || y != mScissorY || width != mScissorWidth || height != mScissorHeight)) { Loading @@ -368,21 +368,28 @@ void Caches::setScissor(GLint x, GLint y, GLint width, GLint height) { mScissorY = y; mScissorWidth = width; mScissorHeight = height; return true; } return false; } void Caches::enableScissor() { bool Caches::enableScissor() { if (!scissorEnabled) { glEnable(GL_SCISSOR_TEST); scissorEnabled = true; return true; } return false; } void Caches::disableScissor() { bool Caches::disableScissor() { if (scissorEnabled) { glDisable(GL_SCISSOR_TEST); scissorEnabled = false; return true; } return false; } void Caches::setScissorEnabled(bool enabled) { Loading
libs/hwui/Caches.h +3 −3 Original line number Diff line number Diff line Loading @@ -197,15 +197,15 @@ public: /** * Sets the scissor for the current surface. */ void setScissor(GLint x, GLint y, GLint width, GLint height); bool setScissor(GLint x, GLint y, GLint width, GLint height); /** * Resets the scissor state. */ void resetScissor(); void enableScissor(); void disableScissor(); bool enableScissor(); bool disableScissor(); void setScissorEnabled(bool enabled); /** Loading
libs/hwui/Debug.h +3 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,9 @@ // Turn on to dump display list state #define DEBUG_DISPLAY_LIST 0 // Turn on to insert an event marker for each display list op #define DEBUG_DISPLAY_LIST_OPS_AS_EVENTS 0 #if DEBUG_INIT #define INIT_LOGD(...) ALOGD(__VA_ARGS__) #else Loading
libs/hwui/DisplayListRenderer.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -852,11 +852,13 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag #endif renderer.startMark(mName.string()); int restoreTo = renderer.save(SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag); DISPLAY_LIST_LOGD("%s%s %d %d", indent, "Save", SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag, restoreTo); setViewProperties(renderer, level); if (renderer.quickReject(0, 0, mWidth, mHeight)) { if (renderer.quickRejectNoScissor(0, 0, mWidth, mHeight)) { DISPLAY_LIST_LOGD("%s%s %d", (char*) indent, "RestoreToCount", restoreTo); renderer.restoreToCount(restoreTo); renderer.endMark(); Loading @@ -865,6 +867,7 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag DisplayListLogBuffer& logBuffer = DisplayListLogBuffer::getInstance(); int saveCount = renderer.getSaveCount() - 1; while (!mReader.eof()) { int op = mReader.readInt(); if (op & OP_MAY_BE_SKIPPED_MASK) { Loading @@ -880,6 +883,10 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag } logBuffer.writeCommand(level, op); #if DEBUG_DISPLAY_LIST_OPS_AS_EVENTS Caches::getInstance().eventMark(strlen(OP_NAMES[op]), OP_NAMES[op]); #endif switch (op) { case DrawGLFunction: { Functor *functor = (Functor *) getInt(); Loading