Loading libs/hwui/OpenGLRenderer.cpp +5 −15 Original line number Diff line number Diff line Loading @@ -1148,7 +1148,6 @@ void OpenGLRenderer::setupDrawColor(int color) { void OpenGLRenderer::setupDrawColor(int color, int alpha) { mColorA = alpha / 255.0f; mColorA *= mSnapshot->alpha; // Second divide of a by 255 is an optimization, allowing us to simply multiply // the rgb values by a instead of also dividing by 255 const float a = mColorA / 255.0f; Loading Loading @@ -1180,15 +1179,6 @@ void OpenGLRenderer::setupDrawColor(float r, float g, float b, float a) { mSetShaderColor = mDescription.setColor(r, g, b, a); } void OpenGLRenderer::setupDrawAlpha8Color(float r, float g, float b, float a) { mColorA = a; mColorR = r; mColorG = g; mColorB = b; mColorSet = true; mSetShaderColor = mDescription.setAlpha8Color(r, g, b, a); } void OpenGLRenderer::setupDrawShader() { if (mShader) { mShader->describe(mDescription, mCaches.extensions); Loading Loading @@ -1770,7 +1760,7 @@ void OpenGLRenderer::drawAARect(float left, float top, float right, float bottom setupDraw(); setupDrawNoTexture(); setupDrawAALine(); setupDrawColor(color); setupDrawColor(color, ((color >> 24) & 0xFF) * mSnapshot->alpha); setupDrawColorFilter(); setupDrawShader(); setupDrawBlending(true, mode); Loading Loading @@ -2266,7 +2256,7 @@ status_t OpenGLRenderer::drawRect(float left, float top, float right, float bott status_t OpenGLRenderer::drawPosText(const char* text, int bytesCount, int count, const float* positions, SkPaint* paint) { if (text == NULL || count == 0 || mSnapshot->isIgnored() || (paint->getAlpha() == 0 && paint->getXfermode() == NULL)) { (paint->getAlpha() * mSnapshot->alpha == 0 && paint->getXfermode() == NULL)) { return DrawGlInfo::kStatusDone; } Loading Loading @@ -2339,7 +2329,7 @@ status_t OpenGLRenderer::drawPosText(const char* text, int bytesCount, int count status_t OpenGLRenderer::drawText(const char* text, int bytesCount, int count, float x, float y, SkPaint* paint, float length) { if (text == NULL || count == 0 || mSnapshot->isIgnored() || (paint->getAlpha() == 0 && paint->getXfermode() == NULL)) { (paint->getAlpha() * mSnapshot->alpha == 0 && paint->getXfermode() == NULL)) { return DrawGlInfo::kStatusDone; } Loading Loading @@ -2392,7 +2382,7 @@ status_t OpenGLRenderer::drawText(const char* text, int bytesCount, int count, const float sx = oldX - shadow->left + mShadowDx; const float sy = oldY - shadow->top + mShadowDy; const int shadowAlpha = ((mShadowColor >> 24) & 0xFF); const int shadowAlpha = ((mShadowColor >> 24) & 0xFF) * mSnapshot->alpha; int shadowColor = mShadowColor; if (mShader) { shadowColor = 0xffffffff; Loading Loading @@ -2791,7 +2781,7 @@ void OpenGLRenderer::drawColorRect(float left, float top, float right, float bot setupDraw(); setupDrawNoTexture(); setupDrawColor(color); setupDrawColor(color, ((color >> 24) & 0xFF) * mSnapshot->alpha); setupDrawShader(); setupDrawColorFilter(); setupDrawBlending(mode); Loading libs/hwui/OpenGLRenderer.h +0 −1 Original line number Diff line number Diff line Loading @@ -537,7 +537,6 @@ private: void setupDrawColor(int color, int alpha); void setupDrawColor(float r, float g, float b, float a); void setupDrawAlpha8Color(int color, int alpha); void setupDrawAlpha8Color(float r, float g, float b, float a); void setupDrawShader(); void setupDrawColorFilter(); void setupDrawBlending(SkXfermode::Mode mode = SkXfermode::kSrcOver_Mode, Loading Loading
libs/hwui/OpenGLRenderer.cpp +5 −15 Original line number Diff line number Diff line Loading @@ -1148,7 +1148,6 @@ void OpenGLRenderer::setupDrawColor(int color) { void OpenGLRenderer::setupDrawColor(int color, int alpha) { mColorA = alpha / 255.0f; mColorA *= mSnapshot->alpha; // Second divide of a by 255 is an optimization, allowing us to simply multiply // the rgb values by a instead of also dividing by 255 const float a = mColorA / 255.0f; Loading Loading @@ -1180,15 +1179,6 @@ void OpenGLRenderer::setupDrawColor(float r, float g, float b, float a) { mSetShaderColor = mDescription.setColor(r, g, b, a); } void OpenGLRenderer::setupDrawAlpha8Color(float r, float g, float b, float a) { mColorA = a; mColorR = r; mColorG = g; mColorB = b; mColorSet = true; mSetShaderColor = mDescription.setAlpha8Color(r, g, b, a); } void OpenGLRenderer::setupDrawShader() { if (mShader) { mShader->describe(mDescription, mCaches.extensions); Loading Loading @@ -1770,7 +1760,7 @@ void OpenGLRenderer::drawAARect(float left, float top, float right, float bottom setupDraw(); setupDrawNoTexture(); setupDrawAALine(); setupDrawColor(color); setupDrawColor(color, ((color >> 24) & 0xFF) * mSnapshot->alpha); setupDrawColorFilter(); setupDrawShader(); setupDrawBlending(true, mode); Loading Loading @@ -2266,7 +2256,7 @@ status_t OpenGLRenderer::drawRect(float left, float top, float right, float bott status_t OpenGLRenderer::drawPosText(const char* text, int bytesCount, int count, const float* positions, SkPaint* paint) { if (text == NULL || count == 0 || mSnapshot->isIgnored() || (paint->getAlpha() == 0 && paint->getXfermode() == NULL)) { (paint->getAlpha() * mSnapshot->alpha == 0 && paint->getXfermode() == NULL)) { return DrawGlInfo::kStatusDone; } Loading Loading @@ -2339,7 +2329,7 @@ status_t OpenGLRenderer::drawPosText(const char* text, int bytesCount, int count status_t OpenGLRenderer::drawText(const char* text, int bytesCount, int count, float x, float y, SkPaint* paint, float length) { if (text == NULL || count == 0 || mSnapshot->isIgnored() || (paint->getAlpha() == 0 && paint->getXfermode() == NULL)) { (paint->getAlpha() * mSnapshot->alpha == 0 && paint->getXfermode() == NULL)) { return DrawGlInfo::kStatusDone; } Loading Loading @@ -2392,7 +2382,7 @@ status_t OpenGLRenderer::drawText(const char* text, int bytesCount, int count, const float sx = oldX - shadow->left + mShadowDx; const float sy = oldY - shadow->top + mShadowDy; const int shadowAlpha = ((mShadowColor >> 24) & 0xFF); const int shadowAlpha = ((mShadowColor >> 24) & 0xFF) * mSnapshot->alpha; int shadowColor = mShadowColor; if (mShader) { shadowColor = 0xffffffff; Loading Loading @@ -2791,7 +2781,7 @@ void OpenGLRenderer::drawColorRect(float left, float top, float right, float bot setupDraw(); setupDrawNoTexture(); setupDrawColor(color); setupDrawColor(color, ((color >> 24) & 0xFF) * mSnapshot->alpha); setupDrawShader(); setupDrawColorFilter(); setupDrawBlending(mode); Loading
libs/hwui/OpenGLRenderer.h +0 −1 Original line number Diff line number Diff line Loading @@ -537,7 +537,6 @@ private: void setupDrawColor(int color, int alpha); void setupDrawColor(float r, float g, float b, float a); void setupDrawAlpha8Color(int color, int alpha); void setupDrawAlpha8Color(float r, float g, float b, float a); void setupDrawShader(); void setupDrawColorFilter(); void setupDrawBlending(SkXfermode::Mode mode = SkXfermode::kSrcOver_Mode, Loading