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_LINUX_H_ | 6 #ifndef SKIA_EXT_CANVAS_PAINT_LINUX_H_ |
7 #define SKIA_EXT_CANVAS_PAINT_LINUX_H_ | 7 #define SKIA_EXT_CANVAS_PAINT_LINUX_H_ |
8 #pragma once | 8 #pragma once |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 GdkRectangle bounds = rectangle(); | 86 GdkRectangle bounds = rectangle(); |
87 if (!T::initialize(bounds.width, bounds.height, opaque, NULL)) { | 87 if (!T::initialize(bounds.width, bounds.height, opaque, NULL)) { |
88 // Cause a deliberate crash; | 88 // Cause a deliberate crash; |
89 CHECK(false); | 89 CHECK(false); |
90 } | 90 } |
91 | 91 |
92 // Need to translate so that the dirty region appears at the origin of the | 92 // Need to translate so that the dirty region appears at the origin of the |
93 // surface. | 93 // surface. |
94 T::translate(-SkIntToScalar(bounds.x), -SkIntToScalar(bounds.y)); | 94 T::translate(-SkIntToScalar(bounds.x), -SkIntToScalar(bounds.y)); |
95 | 95 |
96 context_ = T::getTopPlatformDevice().beginPlatformPaint(); | 96 context_ = T::getTopPlatformDevice().BeginPlatformPaint(); |
97 } | 97 } |
98 | 98 |
99 cairo_t* context_; | 99 cairo_t* context_; |
100 GdkWindow* window_; | 100 GdkWindow* window_; |
101 GdkRegion* region_; | 101 GdkRegion* region_; |
102 // See description above setter. | 102 // See description above setter. |
103 bool composite_alpha_; | 103 bool composite_alpha_; |
104 | 104 |
105 // Disallow copy and assign. | 105 // Disallow copy and assign. |
106 CanvasPaintT(const CanvasPaintT&); | 106 CanvasPaintT(const CanvasPaintT&); |
107 CanvasPaintT& operator=(const CanvasPaintT&); | 107 CanvasPaintT& operator=(const CanvasPaintT&); |
108 }; | 108 }; |
109 | 109 |
110 typedef CanvasPaintT<PlatformCanvas> PlatformCanvasPaint; | 110 typedef CanvasPaintT<PlatformCanvas> PlatformCanvasPaint; |
111 | 111 |
112 } // namespace skia | 112 } // namespace skia |
113 | 113 |
114 #endif // SKIA_EXT_CANVAS_PAINT_LINUX_H_ | 114 #endif // SKIA_EXT_CANVAS_PAINT_LINUX_H_ |
OLD | NEW |