diff options
author | 2016-04-19 12:30:22 -0700 | |
---|---|---|
committer | 2016-04-19 12:30:22 -0700 | |
commit | a7c9d6303a4bd3bda9d7b3f73334f182b11338c4 (patch) | |
tree | 394974ecd89c2449d134070ffd6afc7f32f240fe /src/image/SkImage_Base.h | |
parent | e05bbbba79c569c1d32fa6475feecd1477fd3bee (diff) |
Add onImageInfo call to SkImage_Base.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1903483003
Review URL: https://codereview.chromium.org/1903483003
Diffstat (limited to 'src/image/SkImage_Base.h')
-rw-r--r-- | src/image/SkImage_Base.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h index ec5556a50d..947af0e0d1 100644 --- a/src/image/SkImage_Base.h +++ b/src/image/SkImage_Base.h @@ -26,6 +26,11 @@ public: SkImage_Base(int width, int height, uint32_t uniqueID); virtual ~SkImage_Base(); + // User: returns image info for this SkImage. + // Implementors: if you can not return the value, return an invalid ImageInfo with w=0 & h=0 + // & unknown color space. + virtual SkImageInfo onImageInfo() const = 0; + virtual bool onPeekPixels(SkPixmap*) const { return false; } // Default impl calls onDraw |