diff options
Diffstat (limited to 'libs/hwui/renderthread')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 5 | ||||
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.h | 1 | ||||
-rw-r--r-- | libs/hwui/renderthread/RenderProxy.cpp | 21 | ||||
-rw-r--r-- | libs/hwui/renderthread/RenderProxy.h | 1 |
4 files changed, 3 insertions, 25 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index 1c416a7..b50a433 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -344,11 +344,6 @@ void CanvasContext::runWithGlContext(RenderTask* task) { task->run(); } -Layer* CanvasContext::createRenderLayer(int width, int height) { - requireSurface(); - return LayerRenderer::createRenderLayer(mRenderThread.renderState(), width, height); -} - Layer* CanvasContext::createTextureLayer() { requireSurface(); return LayerRenderer::createTextureLayer(mRenderThread.renderState()); diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h index 2460f6b..d4282fa 100644 --- a/libs/hwui/renderthread/CanvasContext.h +++ b/libs/hwui/renderthread/CanvasContext.h @@ -83,7 +83,6 @@ public: void runWithGlContext(RenderTask* task); - Layer* createRenderLayer(int width, int height); Layer* createTextureLayer(); ANDROID_API static void setTextureAtlas(RenderThread& thread, diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index 9528874..047819d 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -257,31 +257,16 @@ void RenderProxy::enqueueDestroyLayer(Layer* layer) { RenderThread::getInstance().queue(task); } -CREATE_BRIDGE3(createDisplayListLayer, CanvasContext* context, int width, int height) { - Layer* layer = args->context->createRenderLayer(args->width, args->height); - if (!layer) return 0; - return new DeferredLayerUpdater(layer, RenderProxy::enqueueDestroyLayer); -} - -DeferredLayerUpdater* RenderProxy::createDisplayListLayer(int width, int height) { - SETUP_TASK(createDisplayListLayer); - args->width = width; - args->height = height; - args->context = mContext; - void* retval = postAndWait(task); - DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(retval); - return layer; -} - -CREATE_BRIDGE1(createTextureLayer, CanvasContext* context) { +CREATE_BRIDGE2(createTextureLayer, RenderThread* thread, CanvasContext* context) { Layer* layer = args->context->createTextureLayer(); if (!layer) return 0; - return new DeferredLayerUpdater(layer, RenderProxy::enqueueDestroyLayer); + return new DeferredLayerUpdater(*args->thread, layer); } DeferredLayerUpdater* RenderProxy::createTextureLayer() { SETUP_TASK(createTextureLayer); args->context = mContext; + args->thread = &mRenderThread; void* retval = postAndWait(task); DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(retval); return layer; diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h index 8b8d99c..678e7e2 100644 --- a/libs/hwui/renderthread/RenderProxy.h +++ b/libs/hwui/renderthread/RenderProxy.h @@ -80,7 +80,6 @@ public: ANDROID_API void runWithGlContext(RenderTask* task); static void enqueueDestroyLayer(Layer* layer); - ANDROID_API DeferredLayerUpdater* createDisplayListLayer(int width, int height); ANDROID_API DeferredLayerUpdater* createTextureLayer(); ANDROID_API void buildLayer(RenderNode* node); ANDROID_API bool copyLayerInto(DeferredLayerUpdater* layer, SkBitmap* bitmap); |