summaryrefslogtreecommitdiffstats
path: root/libs/hwui/OpenGLRenderer.h
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-12-10 21:01:30 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-10 21:01:30 +0000
commited211b940b24231d02c4e6e2757ee02ff1b9ea79 (patch)
tree775980d368b4b36aee2352c460a320cc8ccb2c5d /libs/hwui/OpenGLRenderer.h
parentdf55bf45e8ebcf699b9b4574db9119809935c549 (diff)
parentf441557d89cab8885940bb63a27159f576749f96 (diff)
downloadframeworks_base-ed211b940b24231d02c4e6e2757ee02ff1b9ea79.zip
frameworks_base-ed211b940b24231d02c4e6e2757ee02ff1b9ea79.tar.gz
frameworks_base-ed211b940b24231d02c4e6e2757ee02ff1b9ea79.tar.bz2
am f441557d: Merge "Fix frame-allocated path lifecycles" into lmp-mr1-dev
* commit 'f441557d89cab8885940bb63a27159f576749f96': Fix frame-allocated path lifecycles
Diffstat (limited to 'libs/hwui/OpenGLRenderer.h')
-rwxr-xr-xlibs/hwui/OpenGLRenderer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index e1c3d10..5eee2e2 100755
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -342,6 +342,12 @@ public:
uint8_t getAmbientShadowAlpha() const { return mAmbientShadowAlpha; }
uint8_t getSpotShadowAlpha() const { return mSpotShadowAlpha; }
+ SkPath* allocPathForFrame() {
+ SkPath* path = new SkPath();
+ mTempPaths.push_back(path);
+ return path;
+ }
+
protected:
/**
* Perform the setup specific to a frame. This method does not
@@ -1014,6 +1020,9 @@ private:
uint8_t mAmbientShadowAlpha;
uint8_t mSpotShadowAlpha;
+ // Paths kept alive for the duration of the frame
+ std::vector<SkPath*> mTempPaths;
+
friend class Layer;
friend class TextSetupFunctor;
friend class DrawBitmapOp;