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

Unified Diff: include/core/SkDevice.h

Issue 920513003: Make filters use SkImage instead of SkBitmap Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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
Index: include/core/SkDevice.h
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index e75f7778fdcfacb8775bdad44a849843dfda9ee3..cf1001299ce2fbd2ec0d429ef9dcce19f37b8000 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -207,6 +207,8 @@ protected:
const SkMatrix& matrix, const SkPaint& paint) = 0;
virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap,
int x, int y, const SkPaint& paint) = 0;
+ virtual void drawSprite(const SkDraw&, const SkImage& bitmap,
reed1 2015/02/25 16:36:20 naming nit: two virtuals w/ the same name are tric
+ int x, int y, const SkPaint& paint) = 0;
/**
* The default impl. will create a bitmap-shader from the bitmap,
@@ -280,14 +282,14 @@ protected:
/**
* Related (but not required) to canHandleImageFilter, this method returns
- * true if the device could apply the filter to the src bitmap and return
+ * true if the device could apply the filter to the src image and return
* the result (and updates offset as needed).
* If the device does not recognize or support this filter,
* it just returns false and leaves result and offset unchanged.
*/
- virtual bool filterImage(const SkImageFilter*, const SkBitmap&,
+ virtual bool filterImage(const SkImageFilter*, const SkImage*,
const SkImageFilter::Context&,
- SkBitmap* /*result*/, SkIPoint* /*offset*/) {
+ SkAutoTUnref<const SkImage>& /*result*/, SkIPoint* /*offset*/) {
return false;
}
@@ -373,6 +375,8 @@ private:
friend class SkDeferredDevice; // for newSurface
friend class SkNoPixelsBitmapDevice;
+ friend class SkSurface;
+ friend class SkSurface_Gpu;
friend class SkSurface_Raster;
// used to change the backend's pixels (and possibly config/rowbytes)

Powered by Google App Engine
This is Rietveld 408576698