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