| 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 <windows.h> | 5 #include <windows.h> |
| 6 #include <psapi.h> | 6 #include <psapi.h> |
| 7 | 7 |
| 8 #include "skia/ext/bitmap_platform_device_win.h" | 8 #include "skia/ext/bitmap_platform_device_win.h" |
| 9 | 9 |
| 10 #include "skia/ext/bitmap_platform_device_data.h" | 10 #include "skia/ext/bitmap_platform_device_data.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 data_ = other.data_; | 199 data_ = other.data_; |
| 200 data_->ref(); | 200 data_->ref(); |
| 201 return *this; | 201 return *this; |
| 202 } | 202 } |
| 203 | 203 |
| 204 HDC BitmapPlatformDevice::getBitmapDC() { | 204 HDC BitmapPlatformDevice::getBitmapDC() { |
| 205 return data_->GetBitmapDC(); | 205 return data_->GetBitmapDC(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform, | 208 void BitmapPlatformDevice::setMatrixClip(const SkMatrix& transform, |
| 209 const SkRegion& region) { | 209 const SkRegion& region, |
| 210 const SkClipStack&) { |
| 210 data_->SetMatrixClip(transform, region); | 211 data_->SetMatrixClip(transform, region); |
| 211 } | 212 } |
| 212 | 213 |
| 213 void BitmapPlatformDevice::drawToHDC(HDC dc, int x, int y, | 214 void BitmapPlatformDevice::drawToHDC(HDC dc, int x, int y, |
| 214 const RECT* src_rect) { | 215 const RECT* src_rect) { |
| 215 bool created_dc = !data_->IsBitmapDCCreated(); | 216 bool created_dc = !data_->IsBitmapDCCreated(); |
| 216 HDC source_dc = getBitmapDC(); | 217 HDC source_dc = getBitmapDC(); |
| 217 | 218 |
| 218 RECT temp_rect; | 219 RECT temp_rect; |
| 219 if (!src_rect) { | 220 if (!src_rect) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 | 275 |
| 275 void BitmapPlatformDevice::onAccessBitmap(SkBitmap* bitmap) { | 276 void BitmapPlatformDevice::onAccessBitmap(SkBitmap* bitmap) { |
| 276 // FIXME(brettw) OPTIMIZATION: We should only flush if we know a GDI | 277 // FIXME(brettw) OPTIMIZATION: We should only flush if we know a GDI |
| 277 // operation has occurred on our DC. | 278 // operation has occurred on our DC. |
| 278 if (data_->IsBitmapDCCreated()) | 279 if (data_->IsBitmapDCCreated()) |
| 279 GdiFlush(); | 280 GdiFlush(); |
| 280 } | 281 } |
| 281 | 282 |
| 282 } // namespace skia | 283 } // namespace skia |
| 283 | 284 |
| OLD | NEW |