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

Unified Diff: src/codec/SkCodecImageGenerator.cpp

Issue 1862133002: Add whitelist parameter to refEncodedData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comments Created 4 years, 8 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 | « include/core/SkImageGenerator.h ('k') | src/core/SkImageCacherator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodecImageGenerator.cpp
diff --git a/src/codec/SkCodecImageGenerator.cpp b/src/codec/SkCodecImageGenerator.cpp
index db13aaea2973f62445477f8fefdf42bef948d761..74037840b0a750142109779cbc5ecf525023a8e6 100644
--- a/src/codec/SkCodecImageGenerator.cpp
+++ b/src/codec/SkCodecImageGenerator.cpp
@@ -39,6 +39,11 @@ SkCodecImageGenerator::SkCodecImageGenerator(SkCodec* codec, SkData* data)
{}
SkData* SkCodecImageGenerator::onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) {
+#ifndef SK_SUPPORT_LEGACY_REFENCODEDDATA_NOCTX
+ if (whitelist && !whitelist->includes(fCodec->getEncodedFormat())) {
+ return nullptr;
+ }
+#endif
return SkRef(fData.get());
}
« no previous file with comments | « include/core/SkImageGenerator.h ('k') | src/core/SkImageCacherator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698