diff options
author | John Reck <jreck@google.com> | 2014-11-07 18:34:53 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-07 18:34:55 +0000 |
commit | 4b19b7aaff1d1ff972ebe68101c2107454bbe5de (patch) | |
tree | d47f409d48eaba0e32ba805a2b0f9309197aec42 /libs/hwui | |
parent | 3546c9a5821fc8a754e05593d314c49cd6bca0d0 (diff) | |
parent | 12f5e3433226f0a2886a98b0b8da8d5e947c5cde (diff) | |
download | frameworks_base-4b19b7aaff1d1ff972ebe68101c2107454bbe5de.zip frameworks_base-4b19b7aaff1d1ff972ebe68101c2107454bbe5de.tar.gz frameworks_base-4b19b7aaff1d1ff972ebe68101c2107454bbe5de.tar.bz2 |
Merge "Fix wrong-thread issue" into lmp-mr1-dev
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/DeferredLayerUpdater.h | 2 | ||||
-rw-r--r-- | libs/hwui/DisplayListRenderer.cpp | 9 | ||||
-rw-r--r-- | libs/hwui/DisplayListRenderer.h | 3 | ||||
-rw-r--r-- | libs/hwui/Renderer.h | 1 |
4 files changed, 9 insertions, 6 deletions
diff --git a/libs/hwui/DeferredLayerUpdater.h b/libs/hwui/DeferredLayerUpdater.h index dda3e89..84411ed 100644 --- a/libs/hwui/DeferredLayerUpdater.h +++ b/libs/hwui/DeferredLayerUpdater.h @@ -76,7 +76,7 @@ public: ANDROID_API bool apply(); - ANDROID_API Layer* backingLayer() { + Layer* backingLayer() { return mLayer; } diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp index 1b1f6cc..c2cb76e 100644 --- a/libs/hwui/DisplayListRenderer.cpp +++ b/libs/hwui/DisplayListRenderer.cpp @@ -23,6 +23,7 @@ #include "ResourceCache.h" #include "DeferredDisplayList.h" +#include "DeferredLayerUpdater.h" #include "DisplayListLogBuffer.h" #include "DisplayListOp.h" #include "DisplayListRenderer.h" @@ -188,9 +189,11 @@ status_t DisplayListRenderer::drawRenderNode(RenderNode* renderNode, Rect& dirty return DrawGlInfo::kStatusDone; } -status_t DisplayListRenderer::drawLayer(Layer* layer, float x, float y) { - mDisplayListData->ref(layer); - addDrawOp(new (alloc()) DrawLayerOp(layer, x, y)); +status_t DisplayListRenderer::drawLayer(DeferredLayerUpdater* layerHandle, float x, float y) { + // We ref the DeferredLayerUpdater due to its thread-safe ref-counting + // semantics. + mDisplayListData->ref(layerHandle); + addDrawOp(new (alloc()) DrawLayerOp(layerHandle->backingLayer(), x, y)); return DrawGlInfo::kStatusDone; } diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h index 8068663..2cc2be3 100644 --- a/libs/hwui/DisplayListRenderer.h +++ b/libs/hwui/DisplayListRenderer.h @@ -45,6 +45,7 @@ namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// class DeferredDisplayList; +class DeferredLayerUpdater; class DisplayListRenderer; class DisplayListOp; class DrawOp; @@ -151,7 +152,7 @@ public: // ---------------------------------------------------------------------------- // Canvas draw operations - special // ---------------------------------------------------------------------------- - virtual status_t drawLayer(Layer* layer, float x, float y); + virtual status_t drawLayer(DeferredLayerUpdater* layerHandle, float x, float y); virtual status_t drawRenderNode(RenderNode* renderNode, Rect& dirty, int32_t replayFlags); // TODO: rename for consistency diff --git a/libs/hwui/Renderer.h b/libs/hwui/Renderer.h index a2f8c05..3159d1e 100644 --- a/libs/hwui/Renderer.h +++ b/libs/hwui/Renderer.h @@ -220,7 +220,6 @@ public: // ---------------------------------------------------------------------------- // Canvas draw operations - special // ---------------------------------------------------------------------------- - virtual status_t drawLayer(Layer* layer, float x, float y) = 0; virtual status_t drawRenderNode(RenderNode* renderNode, Rect& dirty, int32_t replayFlags) = 0; |