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

Unified Diff: src/codec/SkCodec.cpp

Issue 1520403003: Prototype of RAW decoding in Skia. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Set big endian explicitly for arm 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
« no previous file with comments | « src/codec/SkAndroidCodec.cpp ('k') | src/codec/SkRawAdapterCodec.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec.cpp
diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp
index 75e5c34f534639e569fadd9d80039a071de42ddf..cfeeb51d0d52f817d370d9d748f7cfc171785a1a 100644
--- a/src/codec/SkCodec.cpp
+++ b/src/codec/SkCodec.cpp
@@ -15,6 +15,9 @@
#include "SkJpegCodec.h"
#endif
#include "SkPngCodec.h"
+#ifdef SK_CODEC_DECODES_RAW
+#include "SkRawCodec.h"
+#endif
#include "SkStream.h"
#include "SkWbmpCodec.h"
#include "SkWebpCodec.h"
@@ -86,6 +89,11 @@ SkCodec* SkCodec::NewFromStream(SkStream* stream,
return proc.NewFromStream(streamDeleter.detach());
}
}
+
+#ifdef SK_CODEC_DECODES_RAW
+ // Try to treat the input as RAW if all the other checks failed.
+ return SkRawCodec::NewFromStream(streamDeleter.detach());
+#endif
}
return nullptr;
« no previous file with comments | « src/codec/SkAndroidCodec.cpp ('k') | src/codec/SkRawAdapterCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698