Add support for QCOM_tiled_rendering
Bug #7186819
This optional OpenGL extension can be used by tiled renderers to optimize
copies from main memory to tiles memory.
Change-Id: Id4a5d64e61ad17f50e773e8104b9bf584bb65077
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 8dcd33f..10ba86e 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -347,6 +347,20 @@
void syncState();
/**
+ * Tells the GPU what part of the screen is about to be redrawn.
+ * This method needs to be invoked every time getTargetFbo() is
+ * bound again.
+ */
+ void startTiling();
+ void startTiling(const sp<Snapshot>& snapshot);
+
+ /**
+ * Tells the GPU that we are done drawing the frame or that we
+ * are switching to another render target.
+ */
+ void endTiling();
+
+ /**
* Saves the current state of the renderer as a new snapshot.
* The new snapshot is saved in mSnapshot and the previous snapshot
* is linked from mSnapshot->previous.
@@ -735,6 +749,8 @@
sp<Snapshot> mFirstSnapshot;
// Current state
sp<Snapshot> mSnapshot;
+ // State used to define the clipping region
+ sp<Snapshot> mTilingSnapshot;
// Shaders
SkiaShader* mShader;
@@ -784,6 +800,8 @@
GLuint mTextureUnit;
// Track dirty regions, true by default
bool mTrackDirtyRegions;
+ // Indicate whether we are drawing an opaque frame
+ bool mOpaqueFrame;
friend class DisplayListRenderer;