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

Unified Diff: src/codec/SkAndroidCodec.cpp

Issue 1520403003: Prototype of RAW decoding in Skia. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix bug in transferBuffer. Created 4 years, 11 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
Index: src/codec/SkAndroidCodec.cpp
diff --git a/src/codec/SkAndroidCodec.cpp b/src/codec/SkAndroidCodec.cpp
index d309d58501a80004c573e2dcbc39d440967a4f85..0eaef6559798c9922d5a939a9c5f369ee1eb077f 100644
--- a/src/codec/SkAndroidCodec.cpp
+++ b/src/codec/SkAndroidCodec.cpp
@@ -8,6 +8,9 @@
#include "SkAndroidCodec.h"
#include "SkCodec.h"
#include "SkCodecPriv.h"
+#ifdef SK_CODEC_DECODES_RAW
+#include "SkRawAdapterCodec.h"
+#endif
#include "SkSampledCodec.h"
#include "SkWebpAdapterCodec.h"
@@ -37,6 +40,10 @@ SkAndroidCodec* SkAndroidCodec::NewFromStream(SkStream* stream, SkPngChunkReader
case kGIF_SkEncodedFormat:
case kICO_SkEncodedFormat:
return new SkSampledCodec(codec.detach());
+#ifdef SK_CODEC_DECODES_RAW
+ case kRAW_SkEncodedFormat:
+ return new SkRawAdapterCodec((SkRawCodec*)codec.detach());
+#endif
default:
return nullptr;
}
@@ -182,3 +189,4 @@ SkCodec::Result SkAndroidCodec::getAndroidPixels(const SkImageInfo& info, void*
size_t rowBytes) {
return this->getAndroidPixels(info, pixels, rowBytes, nullptr);
}
+
scroggo 2016/01/20 18:13:36 Why did you add this extra line?
yujieqin 2016/01/20 21:42:19 Removed.

Powered by Google App Engine
This is Rietveld 408576698