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_BLIT_H_ | 5 #ifndef UI_GFX_BLIT_H_ |
6 #define UI_GFX_BLIT_H_ | 6 #define UI_GFX_BLIT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
| 10 #include "ui/ui_api.h" |
10 | 11 |
11 class SkCanvas; | 12 class SkCanvas; |
12 | 13 |
13 namespace gfx { | 14 namespace gfx { |
14 | 15 |
15 class Point; | 16 class Point; |
16 class Rect; | 17 class Rect; |
17 | 18 |
18 // Blits a rectangle from the source context into the destination context. | 19 // Blits a rectangle from the source context into the destination context. |
19 void BlitContextToContext(NativeDrawingContext dst_context, | 20 UI_API void BlitContextToContext(NativeDrawingContext dst_context, |
20 const Rect& dst_rect, | 21 const Rect& dst_rect, |
21 NativeDrawingContext src_context, | 22 NativeDrawingContext src_context, |
22 const Point& src_origin); | 23 const Point& src_origin); |
23 | 24 |
24 // Blits a rectangle from the source context into the destination canvas. | 25 // Blits a rectangle from the source context into the destination canvas. |
25 void BlitContextToCanvas(SkCanvas *dst_canvas, | 26 UI_API void BlitContextToCanvas(SkCanvas *dst_canvas, |
26 const Rect& dst_rect, | 27 const Rect& dst_rect, |
27 NativeDrawingContext src_context, | 28 NativeDrawingContext src_context, |
28 const Point& src_origin); | 29 const Point& src_origin); |
29 | 30 |
30 // Blits a rectangle from the source canvas into the destination context. | 31 // Blits a rectangle from the source canvas into the destination context. |
31 void BlitCanvasToContext(NativeDrawingContext dst_context, | 32 UI_API void BlitCanvasToContext(NativeDrawingContext dst_context, |
32 const Rect& dst_rect, | 33 const Rect& dst_rect, |
33 SkCanvas *src_canvas, | 34 SkCanvas *src_canvas, |
34 const Point& src_origin); | 35 const Point& src_origin); |
35 | 36 |
36 // Blits a rectangle from the source canvas into the destination canvas. | 37 // Blits a rectangle from the source canvas into the destination canvas. |
37 void BlitCanvasToCanvas(SkCanvas *dst_canvas, | 38 UI_API void BlitCanvasToCanvas(SkCanvas *dst_canvas, |
38 const Rect& dst_rect, | 39 const Rect& dst_rect, |
39 SkCanvas *src_canvas, | 40 SkCanvas *src_canvas, |
40 const Point& src_origin); | 41 const Point& src_origin); |
41 | 42 |
42 // Scrolls the given subset of the given canvas by the given amount. | 43 // Scrolls the given subset of the given canvas by the given amount. |
43 // The canvas should not have a clip or a transform applied, since platforms | 44 // The canvas should not have a clip or a transform applied, since platforms |
44 // may implement those operations differently. | 45 // may implement those operations differently. |
45 void ScrollCanvas(SkCanvas* canvas, | 46 UI_API void ScrollCanvas(SkCanvas* canvas, |
46 const Rect& clip, | 47 const Rect& clip, |
47 const Point& amount); | 48 const Point& amount); |
48 | 49 |
49 } // namespace gfx | 50 } // namespace gfx |
50 | 51 |
51 #endif // UI_GFX_BLIT_H_ | 52 #endif // UI_GFX_BLIT_H_ |
OLD | NEW |