diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-25 00:10:14 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-25 00:10:14 +0000 |
commit | ae43b850c0d3cd6f82d0b639c349ef896ca55a09 (patch) | |
tree | 9351048b577b779b3fdc80cfcaa8375ef94a732e /ui/gfx/canvas_paint.h | |
parent | bca7497622b009bca0597c48f8c43ec0a7121fbd (diff) | |
download | chromium_src-ae43b850c0d3cd6f82d0b639c349ef896ca55a09.zip chromium_src-ae43b850c0d3cd6f82d0b639c349ef896ca55a09.tar.gz chromium_src-ae43b850c0d3cd6f82d0b639c349ef896ca55a09.tar.bz2 |
ui/gfx: Move CanvasPaintWin into its own file.
This fix the TODO for ben@ in canvas_skia.cc.
R=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9453019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/canvas_paint.h')
-rw-r--r-- | ui/gfx/canvas_paint.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ui/gfx/canvas_paint.h b/ui/gfx/canvas_paint.h new file mode 100644 index 0000000..105aea3 --- /dev/null +++ b/ui/gfx/canvas_paint.h @@ -0,0 +1,37 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_GFX_CANVAS_PAINT_H_ +#define UI_GFX_CANVAS_PAINT_H_ +#pragma once + +#include "ui/base/ui_export.h" +#include "ui/gfx/native_widget_types.h" + +namespace gfx { + +class Canvas; +class Rect; + +class CanvasPaint { + public: + // Creates a canvas that paints to |view| when it is destroyed. The canvas is + // sized to the client area of |view|. + UI_EXPORT static CanvasPaint* CreateCanvasPaint(gfx::NativeView view); + + virtual ~CanvasPaint() {} + + // Returns true if the canvas has an invalid rect that needs to be repainted. + virtual bool IsValid() const = 0; + + // Returns the rectangle that is invalid. + virtual gfx::Rect GetInvalidRect() const = 0; + + // Returns the underlying Canvas. + virtual Canvas* AsCanvas() = 0; +}; + +} // namespace gfx + +#endif // UI_GFX_CANVAS_PAINT_H_ |