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

Unified Diff: skia/ext/bitmap_platform_device_cairo.h

Issue 1963713002: Replace setMatrixClip() with BeginPlatformPaint() logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compensate for any outstanding saveLayer() calls Created 4 years, 7 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
« no previous file with comments | « no previous file | skia/ext/bitmap_platform_device_cairo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/bitmap_platform_device_cairo.h
diff --git a/skia/ext/bitmap_platform_device_cairo.h b/skia/ext/bitmap_platform_device_cairo.h
index 6bc1da1dba73806cd6c6d1cfed39ba956d88b347..d1c9c3509133efb3b041adc1705f327ecafd100b 100644
--- a/skia/ext/bitmap_platform_device_cairo.h
+++ b/skia/ext/bitmap_platform_device_cairo.h
@@ -81,28 +81,19 @@ class BitmapPlatformDevice : public SkBitmapDevice, public PlatformDevice {
static BitmapPlatformDevice* Create(int width, int height, bool is_opaque,
uint8_t* data);
- // Overridden from SkBaseDevice:
- void setMatrixClip(const SkMatrix& transform,
- const SkRegion& region,
- const SkClipStack&) override;
-
protected:
SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override;
private:
// Overridden from PlatformDevice:
- cairo_t* BeginPlatformPaint() override;
+ cairo_t* BeginPlatformPaint(const SkMatrix& transform,
+ const SkIRect& clip_bounds) override;
static BitmapPlatformDevice* Create(int width, int height, bool is_opaque,
cairo_surface_t* surface);
- // Sets the transform and clip operations. This will not update the Cairo
- // context, but will mark the config as dirty. The next call of LoadConfig
- // will pick up these changes.
- void SetMatrixClip(const SkMatrix& transform, const SkRegion& region);
-
// Loads the current transform and clip into the context.
- void LoadConfig();
+ void LoadConfig(const SkMatrix& transform, const SkIRect& clip_bounds);
// Graphics context used to draw into the surface.
cairo_t* cairo_;
@@ -113,13 +104,6 @@ class BitmapPlatformDevice : public SkBitmapDevice, public PlatformDevice {
// the clip and transform for every one.
bool config_dirty_;
- // Translation assigned to the context: we need to keep track of this
- // separately so it can be updated even if the context isn't created yet.
- SkMatrix transform_;
-
- // The current clipping
- SkRegion clip_region_;
-
DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice);
friend class ScopedPlatformPaint;
};
« no previous file with comments | « no previous file | skia/ext/bitmap_platform_device_cairo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698