Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: src/image/SkImage_Codec.cpp

Issue 334793002: hide Config in SkImageDecoder -- use SkColorType instead (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix warning Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/image/SkImagePriv.cpp ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Codec.cpp
diff --git a/src/image/SkImage_Codec.cpp b/src/image/SkImage_Codec.cpp
index 64f58a6aeff4c6b0d835f376b8ba96fa4792a62d..3d815ce7f437409156b94c009a26e733ca77a270 100644
--- a/src/image/SkImage_Codec.cpp
+++ b/src/image/SkImage_Codec.cpp
@@ -41,8 +41,7 @@ SkImage_Codec::~SkImage_Codec() {
void SkImage_Codec::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* paint) {
if (!fBitmap.pixelRef()) {
- if (!SkImageDecoder::DecodeMemory(fEncodedData->bytes(), fEncodedData->size(),
- &fBitmap)) {
+ if (!SkImageDecoder::DecodeMemory(fEncodedData->bytes(), fEncodedData->size(), &fBitmap)) {
return;
}
}
@@ -52,8 +51,7 @@ void SkImage_Codec::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPai
void SkImage_Codec::onDrawRectToRect(SkCanvas* canvas, const SkRect* src,
const SkRect& dst, const SkPaint* paint) {
if (!fBitmap.pixelRef()) {
- if (!SkImageDecoder::DecodeMemory(fEncodedData->bytes(), fEncodedData->size(),
- &fBitmap)) {
+ if (!SkImageDecoder::DecodeMemory(fEncodedData->bytes(), fEncodedData->size(), &fBitmap)) {
return;
}
}
@@ -68,8 +66,7 @@ SkImage* SkImage::NewEncodedData(SkData* data) {
}
SkBitmap bitmap;
- if (!SkImageDecoder::DecodeMemory(data->bytes(), data->size(), &bitmap,
- SkBitmap::kNo_Config,
+ if (!SkImageDecoder::DecodeMemory(data->bytes(), data->size(), &bitmap, kUnknown_SkColorType,
SkImageDecoder::kDecodeBounds_Mode)) {
return NULL;
}
« no previous file with comments | « src/image/SkImagePriv.cpp ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698