summaryrefslogtreecommitdiffstats
path: root/media/tests/omxjpegdecoder
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2014-06-16 17:31:48 -0400
committerMike Reed <reed@google.com>2014-06-20 10:28:37 -0400
commitb933055cf3f7f8ea89bfd3bc9c37a3891ff7310a (patch)
tree7d68b96a6fd02ca6ece664d5c53ee9778ef49d17 /media/tests/omxjpegdecoder
parent9285d1bf9c57e5f1da8f8d8ef7a6a38b2f0e4ec3 (diff)
downloadframeworks_base-b933055cf3f7f8ea89bfd3bc9c37a3891ff7310a.zip
frameworks_base-b933055cf3f7f8ea89bfd3bc9c37a3891ff7310a.tar.gz
frameworks_base-b933055cf3f7f8ea89bfd3bc9c37a3891ff7310a.tar.bz2
stop using (deprecated) SkBitmap::Config
Change-Id: Ic75b5fc6996578e9d95bd3a220439ec1541d7c3b
Diffstat (limited to 'media/tests/omxjpegdecoder')
-rw-r--r--media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp13
-rw-r--r--media/tests/omxjpegdecoder/omx_jpeg_decoder.h4
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;
};