aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImage_Base.h
diff options
context:
space:
mode:
authorGravatar herb <herb@google.com>2016-04-19 12:30:22 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-19 12:30:22 -0700
commita7c9d6303a4bd3bda9d7b3f73334f182b11338c4 (patch)
tree394974ecd89c2449d134070ffd6afc7f32f240fe /src/image/SkImage_Base.h
parente05bbbba79c569c1d32fa6475feecd1477fd3bee (diff)
Add onImageInfo call to SkImage_Base.
Diffstat (limited to 'src/image/SkImage_Base.h')
-rw-r--r--src/image/SkImage_Base.h5
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