summaryrefslogtreecommitdiffstats
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2014-07-08 19:16:14 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-07-07 19:25:01 +0000
commit24b45fee5d59bed2d005fb07d129f67bfb16b97a (patch)
tree30beac0ddda9964b8a4a04cf2b02a5e5dd21761a /libs/hwui/OpenGLRenderer.cpp
parent684b8ce8de45ccec5034bef14a4cb353fc63c31c (diff)
parent1103b3255945d2eb2fa9c191e84e2270b343cca9 (diff)
downloadframeworks_base-24b45fee5d59bed2d005fb07d129f67bfb16b97a.zip
frameworks_base-24b45fee5d59bed2d005fb07d129f67bfb16b97a.tar.gz
frameworks_base-24b45fee5d59bed2d005fb07d129f67bfb16b97a.tar.bz2
Merge "SkBitmap::Config is deprecated, use SkColorType"
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 1bbcff1..c9f541b 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1957,7 +1957,7 @@ status_t OpenGLRenderer::drawBitmaps(const SkBitmap* bitmap, AssetAtlas::Entry*
const float x = (int) floorf(bounds.left + 0.5f);
const float y = (int) floorf(bounds.top + 0.5f);
- if (CC_UNLIKELY(bitmap->config() == SkBitmap::kA8_Config)) {
+ if (CC_UNLIKELY(bitmap->colorType() == kAlpha_8_SkColorType)) {
drawAlpha8TextureMesh(x, y, x + bounds.getWidth(), y + bounds.getHeight(),
texture->id, paint, &vertices[0].x, &vertices[0].u,
GL_TRIANGLES, bitmapCount * 6, true,
@@ -1986,7 +1986,7 @@ status_t OpenGLRenderer::drawBitmap(const SkBitmap* bitmap, float left, float to
if (!texture) return DrawGlInfo::kStatusDone;
const AutoTexture autoCleanup(texture);
- if (CC_UNLIKELY(bitmap->config() == SkBitmap::kA8_Config)) {
+ if (CC_UNLIKELY(bitmap->colorType() == kAlpha_8_SkColorType)) {
drawAlphaBitmap(texture, left, top, paint);
} else {
drawTextureRect(left, top, right, bottom, texture, paint);
@@ -2014,7 +2014,7 @@ status_t OpenGLRenderer::drawBitmap(const SkBitmap* bitmap, const SkMatrix& matr
// to the vertex shader. The save/restore is a bit overkill.
save(SkCanvas::kMatrix_SaveFlag);
concatMatrix(matrix);
- if (CC_UNLIKELY(bitmap->config() == SkBitmap::kA8_Config)) {
+ if (CC_UNLIKELY(bitmap->colorType() == kAlpha_8_SkColorType)) {
drawAlphaBitmap(texture, 0.0f, 0.0f, paint);
} else {
drawTextureRect(0.0f, 0.0f, bitmap->width(), bitmap->height(), texture, paint);
@@ -2037,7 +2037,7 @@ status_t OpenGLRenderer::drawBitmapData(const SkBitmap* bitmap, float left, floa
Texture* texture = mCaches.textureCache.getTransient(bitmap);
const AutoTexture autoCleanup(texture);
- if (CC_UNLIKELY(bitmap->config() == SkBitmap::kA8_Config)) {
+ if (CC_UNLIKELY(bitmap->colorType() == kAlpha_8_SkColorType)) {
drawAlphaBitmap(texture, left, top, paint);
} else {
drawTextureRect(left, top, right, bottom, texture, paint);
@@ -2232,7 +2232,7 @@ status_t OpenGLRenderer::drawBitmap(const SkBitmap* bitmap,
dstBottom = srcBottom - srcTop;
}
- if (CC_UNLIKELY(bitmap->config() == SkBitmap::kA8_Config)) {
+ if (CC_UNLIKELY(bitmap->colorType() == kAlpha_8_SkColorType)) {
drawAlpha8TextureMesh(dstLeft, dstTop, dstRight, dstBottom,
texture->id, paint,
&mMeshVertices[0].x, &mMeshVertices[0].u,