summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-01-25 22:53:24 -0800
committerRomain Guy <romainguy@google.com>2011-01-25 22:53:24 -0800
commitf90f8171e6acb56f9f87093c01fd586f2140697a (patch)
tree4f6580623c857cfad197e2ccd48194aa591a981c /libs
parent5c4c0d50fc1653fb6158e20d9b0af0325a80287c (diff)
downloadframeworks_base-f90f8171e6acb56f9f87093c01fd586f2140697a.zip
frameworks_base-f90f8171e6acb56f9f87093c01fd586f2140697a.tar.gz
frameworks_base-f90f8171e6acb56f9f87093c01fd586f2140697a.tar.bz2
Make sure the opaque bitmap is opaque. GL doesn't like being lied to.
Bug #3382992 The result still looks wrong but it works as designed, unfortunately. Change-Id: I6108e199fa336cb01faaabf6c75faa3b71c2339b
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 9f491b3..c378f46 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -218,6 +218,9 @@ void OpenGLRenderer::releaseContext() {
bool OpenGLRenderer::callDrawGLFunction(Functor *functor) {
interrupt();
+ if (mDirtyClip) {
+ setScissorFromClip();
+ }
status_t result = (*functor)();
resume();
return (result == 0) ? false : true;
@@ -1451,13 +1454,7 @@ void OpenGLRenderer::drawRect(float left, float top, float right, float bottom,
mode = getXfermode(p->getXfermode());
}
- // Skia draws using the color's alpha channel if < 255
- // Otherwise, it uses the paint's alpha
int color = p->getColor();
- if (((color >> 24) & 0xff) == 255) {
- color |= p->getAlpha() << 24;
- }
-
drawColorRect(left, top, right, bottom, color, mode);
}