| OLD | NEW |
| 1 | 1 |
| 2 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #ifndef SKIA_EXT_CANVAS_PAINT_MAC_H_ | 6 #ifndef SKIA_EXT_CANVAS_PAINT_MAC_H_ |
| 7 #define SKIA_EXT_CANVAS_PAINT_MAC_H_ | 7 #define SKIA_EXT_CANVAS_PAINT_MAC_H_ |
| 8 #pragma once | 8 #pragma once |
| 9 | 9 |
| 10 #include "skia/ext/platform_canvas.h" | 10 #include "skia/ext/platform_canvas.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 opaque, NULL)) { | 85 opaque, NULL)) { |
| 86 // Cause a deliberate crash; | 86 // Cause a deliberate crash; |
| 87 *(volatile char*) 0 = 0; | 87 *(volatile char*) 0 = 0; |
| 88 } | 88 } |
| 89 | 89 |
| 90 // Need to translate so that the dirty region appears at the origin of the | 90 // Need to translate so that the dirty region appears at the origin of the |
| 91 // surface. | 91 // surface. |
| 92 T::translate(-SkIntToScalar(rectangle_.origin.x), | 92 T::translate(-SkIntToScalar(rectangle_.origin.x), |
| 93 -SkIntToScalar(rectangle_.origin.y)); | 93 -SkIntToScalar(rectangle_.origin.y)); |
| 94 | 94 |
| 95 context_ = T::getTopPlatformDevice().GetBitmapContext(); | 95 context_ = platform_util::GetBitmapContext(&T::getTopDevice()); |
| 96 } | 96 } |
| 97 | 97 |
| 98 CGContext* context_; | 98 CGContext* context_; |
| 99 NSRect rectangle_; | 99 NSRect rectangle_; |
| 100 // See description above setter. | 100 // See description above setter. |
| 101 bool composite_alpha_; | 101 bool composite_alpha_; |
| 102 | 102 |
| 103 // Disallow copy and assign. | 103 // Disallow copy and assign. |
| 104 CanvasPaintT(const CanvasPaintT&); | 104 CanvasPaintT(const CanvasPaintT&); |
| 105 CanvasPaintT& operator=(const CanvasPaintT&); | 105 CanvasPaintT& operator=(const CanvasPaintT&); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 typedef CanvasPaintT<PlatformCanvas> PlatformCanvasPaint; | 108 typedef CanvasPaintT<PlatformCanvas> PlatformCanvasPaint; |
| 109 | 109 |
| 110 } // namespace skia | 110 } // namespace skia |
| 111 | 111 |
| 112 | 112 |
| 113 #endif // SKIA_EXT_CANVAS_PAINT_MAC_H_ | 113 #endif // SKIA_EXT_CANVAS_PAINT_MAC_H_ |
| OLD | NEW |