aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkDevice.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-12-05 13:07:27 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-05 13:07:27 -0800
commit262a71b7f95ce98ff3dd8dba845afbd724470903 (patch)
tree21609606ff21c0ee84f4034d5aae61654dfce690 /include/core/SkDevice.h
parent50c044b9addac613189d6378641c65721e16b2ed (diff)
detect when we can filter bitmaps/images directly, w/o a tmp layer
visual bench run on Mac Pro curr/maxrss loops min median mean max stddev samples config bench 100/100 MB 16 412µs 413µs 413µs 414µs 0% ▄▁▇▄▄▄▄█▄▃▅ gpu warmupbench 101/102 MB 32 547µs 548µs 611µs 1.24ms 34% █▁▁▁▁▁▁▁▁▁▁ gpu image-filter-sprite-draw-image 102/103 MB 32 547µs 548µs 721µs 1.23ms 41% █▁▇▁▁█▁▁▁▁▁ gpu image-filter-sprite-draw-bitmap 103/103 MB 64 546µs 546µs 546µs 547µs 0% ▆▄▂▁▇█▅▇▅▇▃ gpu image-filter-sprite-draw-sprite Should have no effect on Chrome while SK_SUPPORT_LEGACY_LAYER_BITMAP_IMAGEFILTERS is defined (which it is in chrome) BUG=skia:1073 Review URL: https://codereview.chromium.org/1491293002
Diffstat (limited to 'include/core/SkDevice.h')
-rw-r--r--include/core/SkDevice.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index c52c579424..a7a3895db4 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -374,9 +374,13 @@ private:
friend class SkDeviceFilteredPaint;
friend class SkImageFilter::DeviceProxy;
friend class SkNoPixelsBitmapDevice;
-
friend class SkSurface_Raster;
+ /**
+ * Calls through to drawSprite, processing imagefilter as needed.
+ */
+ void drawBitmapAsSprite(const SkDraw&, const SkBitmap&, int x, int y, const SkPaint&);
+
// used to change the backend's pixels (and possibly config/rowbytes)
// but cannot change the width/height, so there should be no change to
// any clip information.