From a39dd595791b41222ab310b5e8a76a64faa8ba5c Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 14 Feb 2014 16:59:37 -0800 Subject: Refcounting is hard Bug: 12994941 Change-Id: I6285ff818fc696dbe504174b98a54cb1d00b445c --- libs/hwui/DeferredLayerUpdater.cpp | 1 - libs/hwui/DeferredLayerUpdater.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/hwui/DeferredLayerUpdater.cpp b/libs/hwui/DeferredLayerUpdater.cpp index ed05d04..5d3d393 100644 --- a/libs/hwui/DeferredLayerUpdater.cpp +++ b/libs/hwui/DeferredLayerUpdater.cpp @@ -31,7 +31,6 @@ DeferredLayerUpdater::DeferredLayerUpdater(Layer* layer, OpenGLRenderer* rendere , mLayer(layer) , mRenderer(renderer) , mCaches(Caches::getInstance()) { - mCaches.resourceCache.incrementRefcount(mLayer); mWidth = mLayer->layer.getWidth(); mHeight = mLayer->layer.getHeight(); mBlend = mLayer->isBlend(); diff --git a/libs/hwui/DeferredLayerUpdater.h b/libs/hwui/DeferredLayerUpdater.h index 0350eef..9800c2f 100644 --- a/libs/hwui/DeferredLayerUpdater.h +++ b/libs/hwui/DeferredLayerUpdater.h @@ -34,6 +34,8 @@ namespace uirenderer { // of a render pass class DeferredLayerUpdater { public: + // Note that DeferredLayerUpdater assumes it is taking ownership of the layer + // and will not call incrementRef on it as a result. ANDROID_API DeferredLayerUpdater(Layer* layer, OpenGLRenderer* renderer = 0); ANDROID_API ~DeferredLayerUpdater(); -- cgit v1.1