Don't blend transparent pixels when rendering layers.
With this change, the rendere keeps track of what regions are rendered into
and generates a mesh that matches these regions exactly. The mesh is used
to composite the layer on screen.
Change-Id: I1f342576b9134fb29caff7fb8f4c1da179fe956d
diff --git a/libs/hwui/LayerRenderer.h b/libs/hwui/LayerRenderer.h
index ed5d960..f2fb898 100644
--- a/libs/hwui/LayerRenderer.h
+++ b/libs/hwui/LayerRenderer.h
@@ -49,12 +49,17 @@
void prepare(bool opaque);
void finish();
+ bool hasLayer();
+ Region* getRegion();
+
static Layer* createLayer(uint32_t width, uint32_t height, bool isOpaque = false);
static bool resizeLayer(Layer* layer, uint32_t width, uint32_t height);
static void destroyLayer(Layer* layer);
static void destroyLayerDeferred(Layer* layer);
private:
+ void generateMesh();
+
Layer* mLayer;
GLuint mPreviousFbo;