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

Unified Diff: include/core/SkImageGenerator.h

Issue 1404433002: Remove image usage type enum. Use GrTextureParams instead. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix no gpu build Created 5 years, 2 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 | « gyp/gpu.gypi ('k') | include/core/SkImageInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImageGenerator.h
diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h
index 0e2a45e145c5fb6403355b0ec86e63e4248be654..e04e05ea0b383d59959397bdf12cf7ef94e86218 100644
--- a/include/core/SkImageGenerator.h
+++ b/include/core/SkImageGenerator.h
@@ -13,9 +13,10 @@
#include "SkImageInfo.h"
class GrContext;
+class GrTexture;
+class GrTextureParams;
class SkBitmap;
class SkData;
-class GrTexture;
class SkImageGenerator;
class SkMatrix;
class SkPaint;
@@ -142,14 +143,14 @@ public:
* - its internal context is the same
* - it can somehow convert its texture into one that is valid for the provided context.
*
- * Regarding the SkImageUsageType parameter:
+ * Regarding the GrTextureParams parameter:
*
* If the context (the provided one or the generator's intrinsic one) determines that to
* support the specified usage, it must return a different sized texture it may,
* so the caller must inspect the texture's width/height and compare them to the generator's
- * getInfo() width/height.
+ * getInfo() width/height. For readback usage use GrTextureParams::ClampNoFilter()
*/
- GrTexture* generateTexture(GrContext*, SkImageUsageType, const SkIRect* subset = nullptr);
+ GrTexture* generateTexture(GrContext*, const GrTextureParams&, const SkIRect* subset = nullptr);
/**
* If the default image decoder system can interpret the specified (encoded) data, then
@@ -194,7 +195,7 @@ protected:
virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3],
SkYUVColorSpace* colorSpace);
- virtual GrTexture* onGenerateTexture(GrContext*, SkImageUsageType, const SkIRect*) {
+ virtual GrTexture* onGenerateTexture(GrContext*, const GrTextureParams&, const SkIRect*) {
return nullptr;
}
« no previous file with comments | « gyp/gpu.gypi ('k') | include/core/SkImageInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698