Refactor HpackDecoder's public API to ease integration into SpdyFramer.
[chromium-blink-merge.git] / ui / gfx / canvas_paint.h
blob4d38df38ac9b10674985305fd22494e114ee2d28
1 // Copyright (c) 2012 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_CANVAS_PAINT_H_
6 #define UI_GFX_CANVAS_PAINT_H_
8 #include "ui/gfx/gfx_export.h"
9 #include "ui/gfx/native_widget_types.h"
11 namespace gfx {
13 class Canvas;
14 class Rect;
16 class CanvasPaint {
17 public:
18 // Creates a canvas that paints to |view| when it is destroyed. The canvas is
19 // sized to the client area of |view|.
20 GFX_EXPORT static CanvasPaint* CreateCanvasPaint(gfx::NativeView view);
22 virtual ~CanvasPaint() {}
24 // Returns true if the canvas has an invalid rect that needs to be repainted.
25 virtual bool IsValid() const = 0;
27 // Returns the rectangle that is invalid.
28 virtual gfx::Rect GetInvalidRect() const = 0;
30 // Returns the underlying Canvas.
31 virtual Canvas* AsCanvas() = 0;
34 } // namespace gfx
36 #endif // UI_GFX_CANVAS_PAINT_H_