| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_win.h" | 5 #include "skia/ext/bitmap_platform_device_win.h" |
| 6 | 6 |
| 7 #include "SkMatrix.h" | 7 #include "third_party/skia/include/core/SkMatrix.h" |
| 8 #include "SkRefCnt.h" | 8 #include "third_party/skia/include/core/SkRefCnt.h" |
| 9 #include "SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
| 10 #include "SkUtils.h" | 10 #include "third_party/skia/include/core/SkUtils.h" |
| 11 | 11 |
| 12 namespace skia { | 12 namespace skia { |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 // Constrains position and size to fit within available_size. If |size| is -1, | 16 // Constrains position and size to fit within available_size. If |size| is -1, |
| 17 // all the available_size is used. Returns false if the position is out of | 17 // all the available_size is used. Returns false if the position is out of |
| 18 // available_size. | 18 // available_size. |
| 19 bool Constrain(int available_size, int* position, int *size) { | 19 bool Constrain(int available_size, int* position, int *size) { |
| 20 if (*size < -2) | 20 if (*size < -2) |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 362 |
| 363 void BitmapPlatformDeviceWin::onAccessBitmap(SkBitmap* bitmap) { | 363 void BitmapPlatformDeviceWin::onAccessBitmap(SkBitmap* bitmap) { |
| 364 // FIXME(brettw) OPTIMIZATION: We should only flush if we know a GDI | 364 // FIXME(brettw) OPTIMIZATION: We should only flush if we know a GDI |
| 365 // operation has occurred on our DC. | 365 // operation has occurred on our DC. |
| 366 if (data_->IsBitmapDCCreated()) | 366 if (data_->IsBitmapDCCreated()) |
| 367 GdiFlush(); | 367 GdiFlush(); |
| 368 } | 368 } |
| 369 | 369 |
| 370 } // namespace skia | 370 } // namespace skia |
| 371 | 371 |
| OLD | NEW |