summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLRenderer.h
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-09-21 00:39:43 -0700
committerRomain Guy <romainguy@google.com>2012-09-21 00:39:43 -0700
commit11cb642756093a4af901b1525375b1eb2b5c3e2b (patch)
treeb412ad763bb1cc240c65c7545a208e4e709c0b30 /libs/hwui/OpenGLRenderer.h
parent3e87eafc7d1aef95801f1758bb78da8b2f960a75 (diff)
Update layers in a single batch at the beginning of a frame
Bug #7186819 Change-Id: Ice5926dfedfb3be3a3064e65008dafa2852407da
Diffstat (limited to 'libs/hwui/OpenGLRenderer.h')
-rw-r--r--libs/hwui/OpenGLRenderer.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 4bbdde18a83d..3e343361eede 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -132,6 +132,9 @@ public:
ANDROID_API void attachFunctor(Functor* functor);
virtual status_t callDrawGLFunction(Functor* functor, Rect& dirty);
+ ANDROID_API void pushLayerUpdate(Layer* layer);
+ ANDROID_API void clearLayerUpdates();
+
ANDROID_API int getSaveCount() const;
virtual int save(int flags);
virtual void restore();
@@ -339,6 +342,13 @@ protected:
return resultMode;
}
+ /**
+ * Set to true to suppress error checks at the end of a frame.
+ */
+ virtual bool suppressErrorChecks() {
+ return false;
+ }
+
private:
/**
* Ensures the state of the renderer is the same as the state of
@@ -720,6 +730,9 @@ private:
void finishDrawTexture();
void accountForClear(SkXfermode::Mode mode);
+ bool updateLayer(Layer* layer, bool inFrame);
+ void updateLayers();
+
/**
* Renders the specified region as a series of rectangles. This method
* is used for debugging only.
@@ -780,6 +793,8 @@ private:
Vector<Rect*> mLayers;
// List of functors to invoke after a frame is drawn
SortedVector<Functor*> mFunctors;
+ // List of layers to update at the beginning of a frame
+ Vector<Layer*> mLayerUpdates;
// Indentity matrix
const mat4 mIdentity;