diff options
author | Mike Reed <reed@google.com> | 2014-06-20 20:37:28 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-06-20 00:30:35 +0000 |
commit | 402c8f5a07470bd582a5e7d5c5ff581c5e03a545 (patch) | |
tree | c1cafbbe1a06fc74c4dc503956188321d793d33f /libs | |
parent | af861ab87925e64b93c91bcea428f68ee0738772 (diff) | |
parent | b933055cf3f7f8ea89bfd3bc9c37a3891ff7310a (diff) | |
download | frameworks_base-402c8f5a07470bd582a5e7d5c5ff581c5e03a545.zip frameworks_base-402c8f5a07470bd582a5e7d5c5ff581c5e03a545.tar.gz frameworks_base-402c8f5a07470bd582a5e7d5c5ff581c5e03a545.tar.bz2 |
Merge "stop using (deprecated) SkBitmap::Config"
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/PathCache.cpp | 3 | ||||
-rw-r--r-- | libs/hwui/TextureCache.cpp | 3 | ||||
-rw-r--r-- | libs/input/SpriteController.cpp | 5 |
3 files changed, 4 insertions, 7 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp index 9dd5aa5..97eb583 100644 --- a/libs/hwui/PathCache.cpp +++ b/libs/hwui/PathCache.cpp @@ -104,8 +104,7 @@ void PathCache::computeBounds(const SkRect& bounds, const SkPaint* paint, } static void initBitmap(SkBitmap& bitmap, uint32_t width, uint32_t height) { - bitmap.setConfig(SkBitmap::kA8_Config, width, height); - bitmap.allocPixels(); + bitmap.allocPixels(SkImageInfo::MakeA8(width, height)); bitmap.eraseColor(0); } diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp index 1001cae..9212d0a 100644 --- a/libs/hwui/TextureCache.cpp +++ b/libs/hwui/TextureCache.cpp @@ -333,8 +333,7 @@ void TextureCache::generateTexture(const SkBitmap* bitmap, Texture* texture, boo void TextureCache::uploadLoFiTexture(bool resize, const SkBitmap* bitmap, uint32_t width, uint32_t height) { SkBitmap rgbaBitmap; - rgbaBitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height, 0, bitmap->alphaType()); - rgbaBitmap.allocPixels(); + rgbaBitmap.allocPixels(SkImageInfo::MakeN32(width, height, bitmap->alphaType())); rgbaBitmap.eraseColor(0); SkCanvas canvas(rgbaBitmap); diff --git a/libs/input/SpriteController.cpp b/libs/input/SpriteController.cpp index 3f6ccc9..063383b 100644 --- a/libs/input/SpriteController.cpp +++ b/libs/input/SpriteController.cpp @@ -206,9 +206,8 @@ void SpriteController::doUpdateSprites() { } else { SkBitmap surfaceBitmap; ssize_t bpr = outBuffer.stride * bytesPerPixel(outBuffer.format); - surfaceBitmap.setConfig(SkBitmap::kARGB_8888_Config, - outBuffer.width, outBuffer.height, bpr); - surfaceBitmap.setPixels(outBuffer.bits); + surfaceBitmap.installPixels(SkImageInfo::MakeN32Premul(outBuffer.width, outBuffer.height), + outBuffer.bits, bpr); SkCanvas surfaceCanvas(surfaceBitmap); |