aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkSpecialImage.h
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-03-17 15:15:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-17 15:15:58 -0700
commit05849018c85403a34b88819db1c4bcf713b70a2b (patch)
tree0fb054893ced56e90a8baf02400744b45a5b2321 /src/core/SkSpecialImage.h
parent37bd7c3aca66697fff2db79c21771a0b3cbe3b4c (diff)
Add SkSpecialImage::makeTextureImage entry point
This is calved off of: https://codereview.chromium.org/1785643003 (Switch SkBlurImageFilter over to new onFilterImage interface) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813813002 Review URL: https://codereview.chromium.org/1813813002
Diffstat (limited to 'src/core/SkSpecialImage.h')
-rw-r--r--src/core/SkSpecialImage.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/SkSpecialImage.h b/src/core/SkSpecialImage.h
index 1a01a5abc7..47ad6ccab7 100644
--- a/src/core/SkSpecialImage.h
+++ b/src/core/SkSpecialImage.h
@@ -14,12 +14,16 @@
// remove this when internal_getProxy goes away (see skbug.com/4965)
#include "SkImageFilter.h"
+#include "SkImageInfo.h" // for SkAlphaType
+
+class GrContext;
class GrTexture;
class SkBitmap;
class SkCanvas;
class SkImage;
struct SkImageInfo;
class SkPaint;
+class SkPixmap;
class SkSpecialSurface;
enum {
@@ -51,6 +55,13 @@ public:
virtual size_t getSize() const = 0;
/**
+ * Ensures that a special image is backed by a texture (when GrContext is non-null). If no
+ * transformation is required, the returned image may be the same as this special image.
+ * If this special image is from a different GrContext, this will fail.
+ */
+ sk_sp<SkSpecialImage> makeTextureImage(SkImageFilter::Proxy*, GrContext*);
+
+ /**
* Draw this SpecialImage into the canvas.
*/
void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const;