diff options
Diffstat (limited to 'skia/ext/canvas_paint_linux.h')
-rw-r--r-- | skia/ext/canvas_paint_linux.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/skia/ext/canvas_paint_linux.h b/skia/ext/canvas_paint_linux.h index abb6ada..361254b 100644 --- a/skia/ext/canvas_paint_linux.h +++ b/skia/ext/canvas_paint_linux.h @@ -21,7 +21,7 @@ class CanvasPaintT : public T { public:
// This constructor assumes the result is opaque.
explicit CanvasPaintT(GdkEventExpose* event)
- : context_(NULL),
+ : surface_(NULL),
window_(event->window),
rectangle_(event->area),
composite_alpha_(false) {
@@ -29,7 +29,7 @@ class CanvasPaintT : public T { }
CanvasPaintT(GdkEventExpose* event, bool opaque)
- : context_(NULL),
+ : surface_(NULL),
window_(event->window),
rectangle_(event->area),
composite_alpha_(false) {
@@ -44,8 +44,7 @@ class CanvasPaintT : public T { cairo_t* cr = gdk_cairo_create(window_);
if (composite_alpha_)
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
- cairo_surface_t* source_surface = cairo_get_target(context_);
- cairo_set_source_surface(cr, source_surface, rectangle_.x, rectangle_.y);
+ cairo_set_source_surface(cr, surface_, rectangle_.x, rectangle_.y);
cairo_rectangle(cr, rectangle_.x, rectangle_.y,
rectangle_.width, rectangle_.height);
cairo_fill(cr);
@@ -81,10 +80,10 @@ class CanvasPaintT : public T { // surface.
T::translate(-SkIntToScalar(rectangle_.x), -SkIntToScalar(rectangle_.y));
- context_ = T::getTopPlatformDevice().beginPlatformPaint();
+ surface_ = T::getTopPlatformDevice().beginPlatformPaint();
}
- cairo_t* context_;
+ cairo_surface_t* surface_;
GdkWindow* window_;
GdkRectangle rectangle_;
// See description above setter.
|