| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "skia/ext/bitmap_platform_device_data.h" | 7 #include "skia/ext/bitmap_platform_device_data.h" |
| 8 | 8 |
| 9 #include <cairo/cairo.h> | 9 #include <cairo/cairo.h> |
| 10 | 10 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 144 } |
| 145 | 145 |
| 146 SkDeviceFactory* BitmapPlatformDevice::getDeviceFactory() { | 146 SkDeviceFactory* BitmapPlatformDevice::getDeviceFactory() { |
| 147 return SkNEW(BitmapPlatformDeviceFactory); | 147 return SkNEW(BitmapPlatformDeviceFactory); |
| 148 } | 148 } |
| 149 | 149 |
| 150 bool BitmapPlatformDevice::IsVectorial() { | 150 bool BitmapPlatformDevice::IsVectorial() { |
| 151 return false; | 151 return false; |
| 152 } | 152 } |
| 153 | 153 |
| 154 cairo_t* BitmapPlatformDevice::beginPlatformPaint() { | 154 cairo_t* BitmapPlatformDevice::BeginPlatformPaint() { |
| 155 data_->LoadConfig(); | 155 data_->LoadConfig(); |
| 156 cairo_t* cairo = data_->bitmap_context(); | 156 cairo_t* cairo = data_->bitmap_context(); |
| 157 cairo_surface_t* surface = cairo_get_target(cairo); | 157 cairo_surface_t* surface = cairo_get_target(cairo); |
| 158 // Tell cairo to flush anything it has pending. | 158 // Tell cairo to flush anything it has pending. |
| 159 cairo_surface_flush(surface); | 159 cairo_surface_flush(surface); |
| 160 // Tell Cairo that we (probably) modified (actually, will modify) its pixel | 160 // Tell Cairo that we (probably) modified (actually, will modify) its pixel |
| 161 // buffer directly. | 161 // buffer directly. |
| 162 cairo_surface_mark_dirty(surface); | 162 cairo_surface_mark_dirty(surface); |
| 163 return cairo; | 163 return cairo; |
| 164 } | 164 } |
| 165 | 165 |
| 166 void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform, | 166 void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform, |
| 167 const SkRegion& region, | 167 const SkRegion& region, |
| 168 const SkClipStack&) { | 168 const SkClipStack&) { |
| 169 data_->SetMatrixClip(transform, region); | 169 data_->SetMatrixClip(transform, region); |
| 170 } | 170 } |
| 171 | 171 |
| 172 BitmapPlatformDevice& BitmapPlatformDevice::operator=( | 172 BitmapPlatformDevice& BitmapPlatformDevice::operator=( |
| 173 const BitmapPlatformDevice& other) { | 173 const BitmapPlatformDevice& other) { |
| 174 data_ = other.data_; | 174 data_ = other.data_; |
| 175 return *this; | 175 return *this; |
| 176 } | 176 } |
| 177 | 177 |
| 178 } // namespace skia | 178 } // namespace skia |
| OLD | NEW |