summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLRenderer.h
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2015-06-01 10:35:35 -0700
committer Chris Craik <ccraik@google.com> 2015-06-02 16:28:39 -0700
commit53e51e4aa933f9603587e1780f446c18816bf9be (patch)
treefc4701637c9e17fc2765c162b0b051f56bec68aa /libs/hwui/OpenGLRenderer.h
parent1e47a8e096fc28dcab0a55bc4f2e6b747bfb1a07 (diff)
Handle shader matrix correctly when ignoring canvas transform
bug:20063841 Restores old SkShader matrix behavior from before the Glop refactor. Many drawing operations draw without sending the canvas transform to the GL shader. In such cases, we need to adapt the matrix sent to the SkShader logic to invert the canvas transform that's built into the mesh. Change-Id: I42b6f59df36ce46436322b95bf9ad2140795ee58
Diffstat (limited to 'libs/hwui/OpenGLRenderer.h')
-rwxr-xr-xlibs/hwui/OpenGLRenderer.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 8dae82c5b114..29fbf0c985d7 100755
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -640,13 +640,20 @@ private:
void composeLayerRegion(Layer* layer, const Rect& rect);
/**
- * Compose the specified layer as a simple rectangle.
+ * Restores the content in layer to the screen, swapping the blend mode,
+ * specifically used in the restore() of a saveLayerAlpha().
*
- * @param layer The layer to compose
- * @param rect The layer's bounds
- * @param swap If true, the source and destination are swapped
+ * This allows e.g. a layer that would have been drawn on top of existing content (with SrcOver)
+ * to be drawn underneath.
+ *
+ * This will always ignore the canvas transform.
+ */
+ void composeLayerRectSwapped(Layer* layer, const Rect& rect);
+
+ /**
+ * Draws the content in layer to the screen.
*/
- void composeLayerRect(Layer* layer, const Rect& rect, bool swap = false);
+ void composeLayerRect(Layer* layer, const Rect& rect);
/**
* Clears all the regions corresponding to the current list of layers.