Make embedded hardware layers work.
Bug #3369474
Change-Id: Ib6d7fb44eedda9dc2933b5e1b176f307968af91d
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 272c5c2..4150ddc 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -145,14 +145,27 @@
return mSnapshot;
}
+ /**
+ * Returns the region of the current layer.
+ */
virtual Region* getRegion() {
return mSnapshot->region;
}
+ /**
+ * Indicates whether rendering is currently targeted at a layer.
+ */
virtual bool hasLayer() {
return (mSnapshot->flags & Snapshot::kFlagFboTarget) && mSnapshot->region;
}
+ /**
+ * Returns the name of the FBO this renderer is rendering into.
+ */
+ virtual GLint getTargetFbo() {
+ return 0;
+ }
+
private:
/**
* Saves the current state of the renderer as a new snapshot.