OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef UI_GFX_CANVAS_H_ | 5 #ifndef UI_GFX_CANVAS_H_ |
6 #define UI_GFX_CANVAS_H_ | 6 #define UI_GFX_CANVAS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 int dest_x, int dest_y, int w, int h) = 0; | 207 int dest_x, int dest_y, int w, int h) = 0; |
208 | 208 |
209 // Returns a native drawing context for platform specific drawing routines to | 209 // Returns a native drawing context for platform specific drawing routines to |
210 // use. Must be balanced by a call to EndPlatformPaint(). | 210 // use. Must be balanced by a call to EndPlatformPaint(). |
211 virtual gfx::NativeDrawingContext BeginPlatformPaint() = 0; | 211 virtual gfx::NativeDrawingContext BeginPlatformPaint() = 0; |
212 | 212 |
213 // Signifies the end of platform drawing using the native drawing context | 213 // Signifies the end of platform drawing using the native drawing context |
214 // returned by BeginPlatformPaint(). | 214 // returned by BeginPlatformPaint(). |
215 virtual void EndPlatformPaint() = 0; | 215 virtual void EndPlatformPaint() = 0; |
216 | 216 |
| 217 #if !defined(OS_MACOSX) |
217 // Apply transformation on the canvas. | 218 // Apply transformation on the canvas. |
218 virtual void Transform(const ui::Transform& transform) = 0; | 219 virtual void Transform(const ui::Transform& transform) = 0; |
| 220 #endif |
219 | 221 |
220 // Create a texture ID that can be used for accelerated drawing. | 222 // Create a texture ID that can be used for accelerated drawing. |
221 virtual ui::TextureID GetTextureID() = 0; | 223 virtual ui::TextureID GetTextureID() = 0; |
222 | 224 |
223 // TODO(beng): remove this once we don't need to use any skia-specific methods | 225 // TODO(beng): remove this once we don't need to use any skia-specific methods |
224 // through this interface. | 226 // through this interface. |
225 // A quick and dirty way to obtain the underlying SkCanvas. | 227 // A quick and dirty way to obtain the underlying SkCanvas. |
226 virtual CanvasSkia* AsCanvasSkia(); | 228 virtual CanvasSkia* AsCanvasSkia(); |
227 virtual const CanvasSkia* AsCanvasSkia() const; | 229 virtual const CanvasSkia* AsCanvasSkia() const; |
228 }; | 230 }; |
(...skipping 12 matching lines...) Expand all Loading... |
241 // Returns the rectangle that is invalid. | 243 // Returns the rectangle that is invalid. |
242 virtual gfx::Rect GetInvalidRect() const = 0; | 244 virtual gfx::Rect GetInvalidRect() const = 0; |
243 | 245 |
244 // Returns the underlying Canvas. | 246 // Returns the underlying Canvas. |
245 virtual Canvas* AsCanvas() = 0; | 247 virtual Canvas* AsCanvas() = 0; |
246 }; | 248 }; |
247 | 249 |
248 } // namespace gfx; | 250 } // namespace gfx; |
249 | 251 |
250 #endif // UI_GFX_CANVAS_H_ | 252 #endif // UI_GFX_CANVAS_H_ |
OLD | NEW |