Loading core/jni/Android.mk +0 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ LOCAL_CFLAGS += -U__APPLE__ LOCAL_CFLAGS += -Wno-unused-parameter LOCAL_CFLAGS += -Wno-non-virtual-dtor LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses LOCAL_CFLAGS += -DHWUI_NEW_OPS LOCAL_CPPFLAGS += -Wno-conversion-null ifeq ($(TARGET_ARCH), arm) Loading libs/hwui/Android.mk +19 −39 Original line number Diff line number Diff line Loading @@ -2,8 +2,6 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk HWUI_NEW_OPS := true # Enables fine-grained GLES error checking # If set to true, every GLES call is wrapped & error checked # Has moderate overhead Loading Loading @@ -45,19 +43,21 @@ hwui_src_files := \ Animator.cpp \ AnimatorManager.cpp \ AssetAtlas.cpp \ BakedOpDispatcher.cpp \ BakedOpRenderer.cpp \ BakedOpState.cpp \ Caches.cpp \ CanvasState.cpp \ ClipArea.cpp \ DamageAccumulator.cpp \ DeferredDisplayList.cpp \ DeferredLayerUpdater.cpp \ DeviceInfo.cpp \ DisplayList.cpp \ DisplayListCanvas.cpp \ Dither.cpp \ Extensions.cpp \ FboCache.cpp \ FontRenderer.cpp \ FrameBuilder.cpp \ FrameInfo.cpp \ FrameInfoVisualizer.cpp \ GammaFontRenderer.cpp \ Loading @@ -68,23 +68,24 @@ hwui_src_files := \ Interpolator.cpp \ JankTracker.cpp \ Layer.cpp \ LayerCache.cpp \ LayerBuilder.cpp \ LayerRenderer.cpp \ LayerUpdateQueue.cpp \ Matrix.cpp \ OpenGLRenderer.cpp \ OpDumper.cpp \ Patch.cpp \ PatchCache.cpp \ PathCache.cpp \ PathTessellator.cpp \ PathParser.cpp \ PathTessellator.cpp \ PixelBuffer.cpp \ Program.cpp \ ProgramCache.cpp \ Properties.cpp \ PropertyValuesHolder.cpp \ PropertyValuesAnimatorSet.cpp \ PropertyValuesHolder.cpp \ Readback.cpp \ RecordingCanvas.cpp \ RenderBufferCache.cpp \ RenderNode.cpp \ RenderProperties.cpp \ Loading Loading @@ -130,20 +131,6 @@ hwui_cflags += -Wno-free-nonheap-object # clang's warning is broken, see: https://llvm.org/bugs/show_bug.cgi?id=21629 hwui_cflags += -Wno-missing-braces ifeq (true, $(HWUI_NEW_OPS)) hwui_src_files += \ BakedOpDispatcher.cpp \ BakedOpRenderer.cpp \ BakedOpState.cpp \ FrameBuilder.cpp \ LayerBuilder.cpp \ OpDumper.cpp \ RecordingCanvas.cpp hwui_cflags += -DHWUI_NEW_OPS endif ifndef HWUI_COMPILE_SYMBOLS hwui_cflags += -fvisibility=hidden endif Loading Loading @@ -255,40 +242,36 @@ LOCAL_C_INCLUDES := $(hwui_c_includes) LOCAL_SRC_FILES += \ $(hwui_test_common_src_files) \ tests/unit/main.cpp \ tests/unit/BakedOpDispatcherTests.cpp \ tests/unit/BakedOpRendererTests.cpp \ tests/unit/BakedOpStateTests.cpp \ tests/unit/CanvasStateTests.cpp \ tests/unit/ClipAreaTests.cpp \ tests/unit/DamageAccumulatorTests.cpp \ tests/unit/DeviceInfoTests.cpp \ tests/unit/FatVectorTests.cpp \ tests/unit/FontRendererTests.cpp \ tests/unit/FrameBuilderTests.cpp \ tests/unit/GlopBuilderTests.cpp \ tests/unit/GpuMemoryTrackerTests.cpp \ tests/unit/GradientCacheTests.cpp \ tests/unit/LayerUpdateQueueTests.cpp \ tests/unit/LeakCheckTests.cpp \ tests/unit/LinearAllocatorTests.cpp \ tests/unit/MatrixTests.cpp \ tests/unit/MeshStateTests.cpp \ tests/unit/OffscreenBufferPoolTests.cpp \ tests/unit/OpDumperTests.cpp \ tests/unit/RecordingCanvasTests.cpp \ tests/unit/RenderNodeTests.cpp \ tests/unit/RenderPropertiesTests.cpp \ tests/unit/SkiaBehaviorTests.cpp \ tests/unit/SkiaCanvasTests.cpp \ tests/unit/SnapshotTests.cpp \ tests/unit/StringUtilsTests.cpp \ tests/unit/TestUtilsTests.cpp \ tests/unit/TextDropShadowCacheTests.cpp \ tests/unit/VectorDrawableTests.cpp ifeq (true, $(HWUI_NEW_OPS)) LOCAL_SRC_FILES += \ tests/unit/BakedOpDispatcherTests.cpp \ tests/unit/BakedOpRendererTests.cpp \ tests/unit/BakedOpStateTests.cpp \ tests/unit/FrameBuilderTests.cpp \ tests/unit/LeakCheckTests.cpp \ tests/unit/OpDumperTests.cpp \ tests/unit/RecordingCanvasTests.cpp \ tests/unit/SkiaCanvasTests.cpp endif tests/unit/VectorDrawableTests.cpp \ include $(LOCAL_PATH)/hwui_static_deps.mk include $(BUILD_NATIVE_TEST) Loading Loading @@ -344,15 +327,12 @@ LOCAL_SRC_FILES += \ tests/microbench/main.cpp \ tests/microbench/DisplayListCanvasBench.cpp \ tests/microbench/FontBench.cpp \ tests/microbench/FrameBuilderBench.cpp \ tests/microbench/LinearAllocatorBench.cpp \ tests/microbench/PathParserBench.cpp \ tests/microbench/ShadowBench.cpp \ tests/microbench/TaskManagerBench.cpp ifeq (true, $(HWUI_NEW_OPS)) LOCAL_SRC_FILES += \ tests/microbench/FrameBuilderBench.cpp endif include $(LOCAL_PATH)/hwui_static_deps.mk include $(BUILD_NATIVE_BENCHMARK) libs/hwui/Caches.cpp +3 −6 Original line number Diff line number Diff line Loading @@ -163,17 +163,15 @@ void Caches::dumpMemoryUsage(String8 &log) { log.appendFormat("Current memory usage / total memory usage (bytes):\n"); log.appendFormat(" TextureCache %8d / %8d\n", textureCache.getSize(), textureCache.getMaxSize()); log.appendFormat(" LayerCache %8d / %8d (numLayers = %zu)\n", layerCache.getSize(), layerCache.getMaxSize(), layerCache.getCount()); if (mRenderState) { int memused = 0; for (std::set<Layer*>::iterator it = mRenderState->mActiveLayers.begin(); it != mRenderState->mActiveLayers.end(); it++) { const Layer* layer = *it; log.appendFormat(" Layer size %dx%d; isTextureLayer()=%d; texid=%u fbo=%u; refs=%d\n", log.appendFormat(" Layer size %dx%d; texid=%u refs=%d\n", layer->getWidth(), layer->getHeight(), layer->isTextureLayer(), layer->getTextureId(), layer->getFbo(), layer->getStrongCount()); layer->getTextureId(), layer->getStrongCount()); memused += layer->getWidth() * layer->getHeight() * 4; } log.appendFormat(" Layers total %8d (numLayers = %zu)\n", Loading Loading @@ -248,7 +246,6 @@ void Caches::flush(FlushMode mode) { tessellationCache.clear(); // fall through case FlushMode::Layers: layerCache.clear(); renderBufferCache.clear(); break; } Loading libs/hwui/Caches.h +1 −6 Original line number Diff line number Diff line Loading @@ -14,8 +14,7 @@ * limitations under the License. */ #ifndef ANDROID_HWUI_CACHES_H #define ANDROID_HWUI_CACHES_H #pragma once #include "AssetAtlas.h" #include "Dither.h" Loading @@ -23,7 +22,6 @@ #include "FboCache.h" #include "GammaFontRenderer.h" #include "GradientCache.h" #include "LayerCache.h" #include "PatchCache.h" #include "ProgramCache.h" #include "PathCache.h" Loading Loading @@ -146,7 +144,6 @@ private: Extensions mExtensions; public: TextureCache textureCache; LayerCache layerCache; RenderBufferCache renderBufferCache; GradientCache gradientCache; PatchCache patchCache; Loading Loading @@ -205,5 +202,3 @@ private: }; // namespace uirenderer }; // namespace android #endif // ANDROID_HWUI_CACHES_H libs/hwui/CanvasState.cpp +3 −16 Original line number Diff line number Diff line Loading @@ -23,8 +23,7 @@ namespace uirenderer { CanvasState::CanvasState(CanvasStateClient& renderer) : mDirtyClip(false) , mWidth(-1) : mWidth(-1) , mHeight(-1) , mSaveCount(1) , mCanvas(renderer) Loading Loading @@ -205,19 +204,16 @@ void CanvasState::concatMatrix(const Matrix4& matrix) { bool CanvasState::clipRect(float left, float top, float right, float bottom, SkRegion::Op op) { mSnapshot->clip(Rect(left, top, right, bottom), op); mDirtyClip = true; return !mSnapshot->clipIsEmpty(); } bool CanvasState::clipPath(const SkPath* path, SkRegion::Op op) { mSnapshot->clipPath(*path, op); mDirtyClip = true; return !mSnapshot->clipIsEmpty(); } bool CanvasState::clipRegion(const SkRegion* region, SkRegion::Op op) { mSnapshot->clipRegionTransformed(*region, op); mDirtyClip = true; return !mSnapshot->clipIsEmpty(); } Loading @@ -236,15 +232,6 @@ void CanvasState::setClippingOutline(LinearAllocator& allocator, const Outline* } } void CanvasState::setClippingRoundRect(LinearAllocator& allocator, const Rect& rect, float radius, bool highPriority) { mSnapshot->setClippingRoundRect(allocator, rect, radius, highPriority); } void CanvasState::setProjectionPathMask(LinearAllocator& allocator, const SkPath* path) { mSnapshot->setProjectionPathMask(allocator, path); } /////////////////////////////////////////////////////////////////////////////// // Quick Rejection /////////////////////////////////////////////////////////////////////////////// Loading @@ -263,7 +250,7 @@ bool CanvasState::calculateQuickRejectForScissor(float left, float top, float right, float bottom, bool* clipRequired, bool* roundRectClipRequired, bool snapOut) const { if (mSnapshot->isIgnored() || bottom <= top || right <= left) { if (bottom <= top || right <= left) { return true; } Loading Loading @@ -291,7 +278,7 @@ bool CanvasState::calculateQuickRejectForScissor(float left, float top, bool CanvasState::quickRejectConservative(float left, float top, float right, float bottom) const { if (mSnapshot->isIgnored() || bottom <= top || right <= left) { if (bottom <= top || right <= left) { return true; } Loading Loading
core/jni/Android.mk +0 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ LOCAL_CFLAGS += -U__APPLE__ LOCAL_CFLAGS += -Wno-unused-parameter LOCAL_CFLAGS += -Wno-non-virtual-dtor LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses LOCAL_CFLAGS += -DHWUI_NEW_OPS LOCAL_CPPFLAGS += -Wno-conversion-null ifeq ($(TARGET_ARCH), arm) Loading
libs/hwui/Android.mk +19 −39 Original line number Diff line number Diff line Loading @@ -2,8 +2,6 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk HWUI_NEW_OPS := true # Enables fine-grained GLES error checking # If set to true, every GLES call is wrapped & error checked # Has moderate overhead Loading Loading @@ -45,19 +43,21 @@ hwui_src_files := \ Animator.cpp \ AnimatorManager.cpp \ AssetAtlas.cpp \ BakedOpDispatcher.cpp \ BakedOpRenderer.cpp \ BakedOpState.cpp \ Caches.cpp \ CanvasState.cpp \ ClipArea.cpp \ DamageAccumulator.cpp \ DeferredDisplayList.cpp \ DeferredLayerUpdater.cpp \ DeviceInfo.cpp \ DisplayList.cpp \ DisplayListCanvas.cpp \ Dither.cpp \ Extensions.cpp \ FboCache.cpp \ FontRenderer.cpp \ FrameBuilder.cpp \ FrameInfo.cpp \ FrameInfoVisualizer.cpp \ GammaFontRenderer.cpp \ Loading @@ -68,23 +68,24 @@ hwui_src_files := \ Interpolator.cpp \ JankTracker.cpp \ Layer.cpp \ LayerCache.cpp \ LayerBuilder.cpp \ LayerRenderer.cpp \ LayerUpdateQueue.cpp \ Matrix.cpp \ OpenGLRenderer.cpp \ OpDumper.cpp \ Patch.cpp \ PatchCache.cpp \ PathCache.cpp \ PathTessellator.cpp \ PathParser.cpp \ PathTessellator.cpp \ PixelBuffer.cpp \ Program.cpp \ ProgramCache.cpp \ Properties.cpp \ PropertyValuesHolder.cpp \ PropertyValuesAnimatorSet.cpp \ PropertyValuesHolder.cpp \ Readback.cpp \ RecordingCanvas.cpp \ RenderBufferCache.cpp \ RenderNode.cpp \ RenderProperties.cpp \ Loading Loading @@ -130,20 +131,6 @@ hwui_cflags += -Wno-free-nonheap-object # clang's warning is broken, see: https://llvm.org/bugs/show_bug.cgi?id=21629 hwui_cflags += -Wno-missing-braces ifeq (true, $(HWUI_NEW_OPS)) hwui_src_files += \ BakedOpDispatcher.cpp \ BakedOpRenderer.cpp \ BakedOpState.cpp \ FrameBuilder.cpp \ LayerBuilder.cpp \ OpDumper.cpp \ RecordingCanvas.cpp hwui_cflags += -DHWUI_NEW_OPS endif ifndef HWUI_COMPILE_SYMBOLS hwui_cflags += -fvisibility=hidden endif Loading Loading @@ -255,40 +242,36 @@ LOCAL_C_INCLUDES := $(hwui_c_includes) LOCAL_SRC_FILES += \ $(hwui_test_common_src_files) \ tests/unit/main.cpp \ tests/unit/BakedOpDispatcherTests.cpp \ tests/unit/BakedOpRendererTests.cpp \ tests/unit/BakedOpStateTests.cpp \ tests/unit/CanvasStateTests.cpp \ tests/unit/ClipAreaTests.cpp \ tests/unit/DamageAccumulatorTests.cpp \ tests/unit/DeviceInfoTests.cpp \ tests/unit/FatVectorTests.cpp \ tests/unit/FontRendererTests.cpp \ tests/unit/FrameBuilderTests.cpp \ tests/unit/GlopBuilderTests.cpp \ tests/unit/GpuMemoryTrackerTests.cpp \ tests/unit/GradientCacheTests.cpp \ tests/unit/LayerUpdateQueueTests.cpp \ tests/unit/LeakCheckTests.cpp \ tests/unit/LinearAllocatorTests.cpp \ tests/unit/MatrixTests.cpp \ tests/unit/MeshStateTests.cpp \ tests/unit/OffscreenBufferPoolTests.cpp \ tests/unit/OpDumperTests.cpp \ tests/unit/RecordingCanvasTests.cpp \ tests/unit/RenderNodeTests.cpp \ tests/unit/RenderPropertiesTests.cpp \ tests/unit/SkiaBehaviorTests.cpp \ tests/unit/SkiaCanvasTests.cpp \ tests/unit/SnapshotTests.cpp \ tests/unit/StringUtilsTests.cpp \ tests/unit/TestUtilsTests.cpp \ tests/unit/TextDropShadowCacheTests.cpp \ tests/unit/VectorDrawableTests.cpp ifeq (true, $(HWUI_NEW_OPS)) LOCAL_SRC_FILES += \ tests/unit/BakedOpDispatcherTests.cpp \ tests/unit/BakedOpRendererTests.cpp \ tests/unit/BakedOpStateTests.cpp \ tests/unit/FrameBuilderTests.cpp \ tests/unit/LeakCheckTests.cpp \ tests/unit/OpDumperTests.cpp \ tests/unit/RecordingCanvasTests.cpp \ tests/unit/SkiaCanvasTests.cpp endif tests/unit/VectorDrawableTests.cpp \ include $(LOCAL_PATH)/hwui_static_deps.mk include $(BUILD_NATIVE_TEST) Loading Loading @@ -344,15 +327,12 @@ LOCAL_SRC_FILES += \ tests/microbench/main.cpp \ tests/microbench/DisplayListCanvasBench.cpp \ tests/microbench/FontBench.cpp \ tests/microbench/FrameBuilderBench.cpp \ tests/microbench/LinearAllocatorBench.cpp \ tests/microbench/PathParserBench.cpp \ tests/microbench/ShadowBench.cpp \ tests/microbench/TaskManagerBench.cpp ifeq (true, $(HWUI_NEW_OPS)) LOCAL_SRC_FILES += \ tests/microbench/FrameBuilderBench.cpp endif include $(LOCAL_PATH)/hwui_static_deps.mk include $(BUILD_NATIVE_BENCHMARK)
libs/hwui/Caches.cpp +3 −6 Original line number Diff line number Diff line Loading @@ -163,17 +163,15 @@ void Caches::dumpMemoryUsage(String8 &log) { log.appendFormat("Current memory usage / total memory usage (bytes):\n"); log.appendFormat(" TextureCache %8d / %8d\n", textureCache.getSize(), textureCache.getMaxSize()); log.appendFormat(" LayerCache %8d / %8d (numLayers = %zu)\n", layerCache.getSize(), layerCache.getMaxSize(), layerCache.getCount()); if (mRenderState) { int memused = 0; for (std::set<Layer*>::iterator it = mRenderState->mActiveLayers.begin(); it != mRenderState->mActiveLayers.end(); it++) { const Layer* layer = *it; log.appendFormat(" Layer size %dx%d; isTextureLayer()=%d; texid=%u fbo=%u; refs=%d\n", log.appendFormat(" Layer size %dx%d; texid=%u refs=%d\n", layer->getWidth(), layer->getHeight(), layer->isTextureLayer(), layer->getTextureId(), layer->getFbo(), layer->getStrongCount()); layer->getTextureId(), layer->getStrongCount()); memused += layer->getWidth() * layer->getHeight() * 4; } log.appendFormat(" Layers total %8d (numLayers = %zu)\n", Loading Loading @@ -248,7 +246,6 @@ void Caches::flush(FlushMode mode) { tessellationCache.clear(); // fall through case FlushMode::Layers: layerCache.clear(); renderBufferCache.clear(); break; } Loading
libs/hwui/Caches.h +1 −6 Original line number Diff line number Diff line Loading @@ -14,8 +14,7 @@ * limitations under the License. */ #ifndef ANDROID_HWUI_CACHES_H #define ANDROID_HWUI_CACHES_H #pragma once #include "AssetAtlas.h" #include "Dither.h" Loading @@ -23,7 +22,6 @@ #include "FboCache.h" #include "GammaFontRenderer.h" #include "GradientCache.h" #include "LayerCache.h" #include "PatchCache.h" #include "ProgramCache.h" #include "PathCache.h" Loading Loading @@ -146,7 +144,6 @@ private: Extensions mExtensions; public: TextureCache textureCache; LayerCache layerCache; RenderBufferCache renderBufferCache; GradientCache gradientCache; PatchCache patchCache; Loading Loading @@ -205,5 +202,3 @@ private: }; // namespace uirenderer }; // namespace android #endif // ANDROID_HWUI_CACHES_H
libs/hwui/CanvasState.cpp +3 −16 Original line number Diff line number Diff line Loading @@ -23,8 +23,7 @@ namespace uirenderer { CanvasState::CanvasState(CanvasStateClient& renderer) : mDirtyClip(false) , mWidth(-1) : mWidth(-1) , mHeight(-1) , mSaveCount(1) , mCanvas(renderer) Loading Loading @@ -205,19 +204,16 @@ void CanvasState::concatMatrix(const Matrix4& matrix) { bool CanvasState::clipRect(float left, float top, float right, float bottom, SkRegion::Op op) { mSnapshot->clip(Rect(left, top, right, bottom), op); mDirtyClip = true; return !mSnapshot->clipIsEmpty(); } bool CanvasState::clipPath(const SkPath* path, SkRegion::Op op) { mSnapshot->clipPath(*path, op); mDirtyClip = true; return !mSnapshot->clipIsEmpty(); } bool CanvasState::clipRegion(const SkRegion* region, SkRegion::Op op) { mSnapshot->clipRegionTransformed(*region, op); mDirtyClip = true; return !mSnapshot->clipIsEmpty(); } Loading @@ -236,15 +232,6 @@ void CanvasState::setClippingOutline(LinearAllocator& allocator, const Outline* } } void CanvasState::setClippingRoundRect(LinearAllocator& allocator, const Rect& rect, float radius, bool highPriority) { mSnapshot->setClippingRoundRect(allocator, rect, radius, highPriority); } void CanvasState::setProjectionPathMask(LinearAllocator& allocator, const SkPath* path) { mSnapshot->setProjectionPathMask(allocator, path); } /////////////////////////////////////////////////////////////////////////////// // Quick Rejection /////////////////////////////////////////////////////////////////////////////// Loading @@ -263,7 +250,7 @@ bool CanvasState::calculateQuickRejectForScissor(float left, float top, float right, float bottom, bool* clipRequired, bool* roundRectClipRequired, bool snapOut) const { if (mSnapshot->isIgnored() || bottom <= top || right <= left) { if (bottom <= top || right <= left) { return true; } Loading Loading @@ -291,7 +278,7 @@ bool CanvasState::calculateQuickRejectForScissor(float left, float top, bool CanvasState::quickRejectConservative(float left, float top, float right, float bottom) const { if (mSnapshot->isIgnored() || bottom <= top || right <= left) { if (bottom <= top || right <= left) { return true; } Loading