summaryrefslogtreecommitdiff
path: root/libs/hwui/Layer.h
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2014-09-08 16:40:21 -0700
committer Chris Craik <ccraik@google.com> 2014-09-08 16:44:47 -0700
commit8a226d24b8b2fde4c855d0051cb7bfc5b5813c36 (patch)
treedff0340b91172e35a5e2bff67e013e2fd27623ca /libs/hwui/Layer.h
parent95e71085e2d6f9482679a2a5c34d3d7fbc7d39c6 (diff)
Don't track TextureLayer lifecycles in RenderState
bug:17208461 They are destroyed via finalizer-enqueued destroy method, so it's not valid to check that they've been destroyed at gl context destruction time. Change-Id: I670f69825547facd5f31d44acb406418881fee00
Diffstat (limited to 'libs/hwui/Layer.h')
-rw-r--r--libs/hwui/Layer.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 911b99880334..36a4ed11d2e8 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -54,7 +54,12 @@ class DeferStateStruct;
*/
class Layer {
public:
- Layer(RenderState& renderState, const uint32_t layerWidth, const uint32_t layerHeight);
+ enum Type {
+ kType_Texture,
+ kType_DisplayList,
+ };
+
+ Layer(Type type, RenderState& renderState, const uint32_t layerWidth, const uint32_t layerHeight);
~Layer();
static uint32_t computeIdealWidth(uint32_t layerWidth);
@@ -219,11 +224,7 @@ public:
}
inline bool isTextureLayer() const {
- return textureLayer;
- }
-
- inline void setTextureLayer(bool textureLayer) {
- this->textureLayer = textureLayer;
+ return type == kType_Texture;
}
inline SkColorFilter* getColorFilter() const {
@@ -343,10 +344,9 @@ private:
bool cacheable;
/**
- * When set to true, this layer must be treated as a texture
- * layer.
+ * Denotes whether the layer is a DisplayList, or Texture layer.
*/
- bool textureLayer;
+ const Type type;
/**
* When set to true, this layer is dirty and should be cleared