[Histograms]: Add histograms for requestIdleCallback.
[chromium-blink-merge.git] / ui / gfx / blit.h
blobf568dc47dd4254f43090ba11412aa02578afc44e
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
3 // found in the LICENSE file.
5 #ifndef UI_GFX_BLIT_H_
6 #define UI_GFX_BLIT_H_
8 #include "ui/gfx/gfx_export.h"
9 #include "ui/gfx/native_widget_types.h"
11 class SkCanvas;
13 namespace gfx {
15 class Point;
16 class Rect;
17 class Vector2d;
19 // Blits a rectangle from the source context into the destination context.
20 GFX_EXPORT void BlitContextToContext(NativeDrawingContext dst_context,
21 const Rect& dst_rect,
22 NativeDrawingContext src_context,
23 const Point& src_origin);
25 // Blits a rectangle from the source canvas into the destination canvas.
26 GFX_EXPORT void BlitCanvasToCanvas(SkCanvas *dst_canvas,
27 const Rect& dst_rect,
28 SkCanvas *src_canvas,
29 const Point& src_origin);
31 // Scrolls the given subset of the given canvas by the given offset.
32 // The canvas should not have a clip or a transform applied, since platforms
33 // may implement those operations differently.
34 GFX_EXPORT void ScrollCanvas(SkCanvas* canvas,
35 const Rect& clip,
36 const Vector2d& offset);
38 } // namespace gfx
40 #endif // UI_GFX_BLIT_H_