diff options
author | 2015-08-18 11:16:09 -0700 | |
---|---|---|
committer | 2015-08-18 11:16:09 -0700 | |
commit | 935d6cfaa78b6be75c9fcc596805f0f9b8da972e (patch) | |
tree | 2e3eb27f6c0a2d538f2e4e4922627a7c9e1fb30d /include/core | |
parent | f272bb03df9b86e7ea2cf23fb4d5cc56624e0118 (diff) |
Add subsets to SkImageGenerator and SkImageCacherator
... to support subsets in SkImage!
BUG=skia:
Review URL: https://codereview.chromium.org/1301633002
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkImageGenerator.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h index aa9a6d1157..c84463def2 100644 --- a/include/core/SkImageGenerator.h +++ b/include/core/SkImageGenerator.h @@ -148,7 +148,7 @@ public: * so the caller must inspect the texture's width/height and compare them to the generator's * getInfo() width/height. */ - GrTexture* generateTexture(GrContext*, SkImageUsageType); + GrTexture* generateTexture(GrContext*, SkImageUsageType, const SkIRect* subset = nullptr); /** * If the default image decoder system can interpret the specified (encoded) data, then @@ -176,7 +176,9 @@ protected: virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], SkYUVColorSpace* colorSpace); - virtual GrTexture* onGenerateTexture(GrContext*, SkImageUsageType) { return nullptr; } + virtual GrTexture* onGenerateTexture(GrContext*, SkImageUsageType, const SkIRect*) { + return nullptr; + } private: const SkImageInfo fInfo; |