summaryrefslogtreecommitdiffstats
path: root/libs/hwui/OpenGLRenderer.h
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-09-10 19:20:06 -0700
committerRomain Guy <romainguy@google.com>2010-09-12 12:24:12 -0700
commitf607bdc167f66b3e7003acaa4736ae46d78c1492 (patch)
treeb3b4fb761b25d08ba836ff822f6e72d85b5be695 /libs/hwui/OpenGLRenderer.h
parentd14f0dfd58af653a2d41424d472fe97de6af0a78 (diff)
downloadframeworks_base-f607bdc167f66b3e7003acaa4736ae46d78c1492.zip
frameworks_base-f607bdc167f66b3e7003acaa4736ae46d78c1492.tar.gz
frameworks_base-f607bdc167f66b3e7003acaa4736ae46d78c1492.tar.bz2
Correct implementation of saveLayer().
Change-Id: I5375126636913e0a84f2d6bbd0ebe40d2e4f2763
Diffstat (limited to 'libs/hwui/OpenGLRenderer.h')
-rw-r--r--libs/hwui/OpenGLRenderer.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 50f42c2..e7f933f 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -166,9 +166,11 @@ private:
* @param color The rectangle's ARGB color, defined as a packed 32 bits word
* @param mode The Skia xfermode to use
* @param ignoreTransform True if the current transform should be ignored
+ * @paran ignoreBlending True if the blending is set by the caller
*/
void drawColorRect(float left, float top, float right, float bottom,
- int color, SkXfermode::Mode mode, bool ignoreTransform = false);
+ int color, SkXfermode::Mode mode, bool ignoreTransform = false,
+ bool ignoreBlending = false);
/**
* Draws a textured rectangle with the specified texture. The specified coordinates
@@ -216,10 +218,13 @@ private:
* @param texCoords The texture coordinates of each vertex
* @param indices The indices of the vertices, can be NULL
* @param elementsCount The number of elements in the mesh, required by indices
+ * @param swapSrcDst Whether or not the src and dst blending operations should be swapped
+ * @param ignoreTransform True if the current transform should be ignored
*/
void drawTextureMesh(float left, float top, float right, float bottom, GLuint texture,
float alpha, SkXfermode::Mode mode, bool blend,
- GLvoid* vertices, GLvoid* texCoords, GLvoid* indices, GLsizei elementsCount = 0);
+ GLvoid* vertices, GLvoid* texCoords, GLvoid* indices, GLsizei elementsCount = 0,
+ bool swapSrcDst = false, bool ignoreTransform = false);
/**
* Prepares the renderer to draw the specified shadow.
@@ -322,8 +327,13 @@ private:
* Enable or disable blending as necessary. This function sets the appropriate
* blend function based on the specified xfermode.
*/
- inline void chooseBlending(bool blend, SkXfermode::Mode mode, ProgramDescription& description);
+ inline void chooseBlending(bool blend, SkXfermode::Mode mode, ProgramDescription& description,
+ bool swapSrcDst = false);
+ /**
+ * Safely retrieves the mode from the specified xfermode. If the specified
+ * xfermode is null, the mode is assumed to be SkXfermode::kSrcOver_Mode.
+ */
inline SkXfermode::Mode getXfermode(SkXfermode* mode);
/**