| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "skia/ext/bitmap_platform_device_linux.h" | 5 #include "skia/ext/bitmap_platform_device_linux.h" |
| 6 | 6 |
| 7 #include <cairo/cairo.h> | 7 #include <cairo/cairo.h> |
| 8 | 8 |
| 9 namespace skia { | 9 namespace skia { |
| 10 | 10 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 const BitmapPlatformDevice& other) | 180 const BitmapPlatformDevice& other) |
| 181 : PlatformDevice(const_cast<BitmapPlatformDevice&>( | 181 : PlatformDevice(const_cast<BitmapPlatformDevice&>( |
| 182 other).accessBitmap(true)), | 182 other).accessBitmap(true)), |
| 183 data_(other.data_) { | 183 data_(other.data_) { |
| 184 } | 184 } |
| 185 | 185 |
| 186 BitmapPlatformDevice::~BitmapPlatformDevice() { | 186 BitmapPlatformDevice::~BitmapPlatformDevice() { |
| 187 } | 187 } |
| 188 | 188 |
| 189 cairo_t* BitmapPlatformDevice::beginPlatformPaint() { | 189 cairo_t* BitmapPlatformDevice::beginPlatformPaint() { |
| 190 return data_->GetContext(); | 190 cairo_t* cairo = data_->GetContext(); |
| 191 // Tell Cairo that we've (probably) modified its pixel buffer without |
| 192 // its knowledge. |
| 193 cairo_surface_mark_dirty(cairo_get_target(cairo)); |
| 194 return cairo; |
| 191 } | 195 } |
| 192 | 196 |
| 193 void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform, | 197 void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform, |
| 194 const SkRegion& region) { | 198 const SkRegion& region) { |
| 195 data_->SetMatrixClip(transform, region); | 199 data_->SetMatrixClip(transform, region); |
| 196 } | 200 } |
| 197 | 201 |
| 198 BitmapPlatformDevice& BitmapPlatformDevice::operator=( | 202 BitmapPlatformDevice& BitmapPlatformDevice::operator=( |
| 199 const BitmapPlatformDevice& other) { | 203 const BitmapPlatformDevice& other) { |
| 200 data_ = other.data_; | 204 data_ = other.data_; |
| 201 return *this; | 205 return *this; |
| 202 } | 206 } |
| 203 | 207 |
| 204 } // namespace skia | 208 } // namespace skia |
| OLD | NEW |