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

Unified Diff: src/core/SkImageCacherator.h

Issue 1862133002: Add whitelist parameter to refEncodedData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make test pass regardless of CTX build flag 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
Index: src/core/SkImageCacherator.h
diff --git a/src/core/SkImageCacherator.h b/src/core/SkImageCacherator.h
index 7e146182c7ac3a763e7d431a262f5cd06677ca01..c9d8f9b7090bb25d29df9302f3bf6e0ac60c1110 100644
--- a/src/core/SkImageCacherator.h
+++ b/src/core/SkImageCacherator.h
@@ -8,6 +8,7 @@
#ifndef SkImageCacherator_DEFINED
#define SkImageCacherator_DEFINED
+#include "SkImage.h"
#include "SkImageGenerator.h"
#include "SkMutex.h"
#include "SkTemplates.h"
@@ -101,4 +102,15 @@ private:
friend class GrImageTextureMaker;
};
+// Exposed so it can be tested, not mean to external usage per-se
+//
+class SkEncodedFormatQuery_Gpu : public SkEncodedFormatQuery {
+ GrContext* fCtx;
+public:
+ SkEncodedFormatQuery_Gpu(GrContext* ctx) : fCtx(ctx) {}
+
+ bool supportedFormat(SkEncodedFormat format) override;
+ bool supportedFormatFromData(const void* data, size_t length) override;
+};
+
#endif

Powered by Google App Engine
This is Rietveld 408576698