Optimize FBO drawing with regions.
This optimization is currently disabled until Launcher is
modified to take advantage of it. The optimization can be
enabled by turning on RENDER_LAYERS_AS_REGIONS in the
OpenGLRenderer.h file.
Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 2afe2fa..a780183 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -14,13 +14,15 @@
* limitations under the License.
*/
-#ifndef ANDROID_UI_LAYER_H
-#define ANDROID_UI_LAYER_H
+#ifndef ANDROID_HWUI_LAYER_H
+#define ANDROID_HWUI_LAYER_H
#include <sys/types.h>
#include <GLES2/gl2.h>
+#include <ui/Region.h>
+
#include <SkXfermode.h>
#include "Rect.h"
@@ -85,9 +87,15 @@
* Height of the layer texture.
*/
uint32_t height;
+
+ /**
+ * Dirty region indicating what parts of the layer
+ * have been drawn.
+ */
+ Region region;
}; // struct Layer
}; // namespace uirenderer
}; // namespace android
-#endif // ANDROID_UI_LAYER_H
+#endif // ANDROID_HWUI_LAYER_H