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 /media/tests | |
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 'media/tests')
-rw-r--r-- | media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp | 13 | ||||
-rw-r--r-- | media/tests/omxjpegdecoder/omx_jpeg_decoder.h | 4 |
2 files changed, 5 insertions, 12 deletions
diff --git a/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp b/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp index a4d292a..b8b6c04 100644 --- a/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp +++ b/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp @@ -169,15 +169,10 @@ bool OmxJpegImageDecoder::decodeSource(sp<MediaSource> decoder, return true; } -void OmxJpegImageDecoder::configBitmapSize(SkBitmap* bm, SkBitmap::Config pref, +void OmxJpegImageDecoder::configBitmapSize(SkBitmap* bm, SkColorType pref, int width, int height) { - bm->setConfig(getColorSpaceConfig(pref), width, height, 0, kOpaque_SkAlphaType); -} - -SkBitmap::Config OmxJpegImageDecoder::getColorSpaceConfig( - SkBitmap::Config pref) { - - // Set the color space to ARGB_8888 for now + // Set the color space to ARGB_8888 for now (ignoring pref) // because of limitation in hardware support. - return SkBitmap::kARGB_8888_Config; + bm->setInfo(SkImageInfo::MakeN32(width, height, kOpaque_SkAlphaType); } + diff --git a/media/tests/omxjpegdecoder/omx_jpeg_decoder.h b/media/tests/omxjpegdecoder/omx_jpeg_decoder.h index e431e72..e487245 100644 --- a/media/tests/omxjpegdecoder/omx_jpeg_decoder.h +++ b/media/tests/omxjpegdecoder/omx_jpeg_decoder.h @@ -49,9 +49,7 @@ private: sp<MediaSource> getDecoder(OMXClient* client, const sp<MediaSource>& source); bool decodeSource(sp<MediaSource> decoder, const sp<MediaSource>& source, SkBitmap* bm); - void configBitmapSize(SkBitmap* bm, SkBitmap::Config pref, int width, - int height); - SkBitmap::Config getColorSpaceConfig(SkBitmap::Config pref); + void configBitmapSize(SkBitmap* bm, SkColorType, int width, int height); OMXClient mClient; }; |