summaryrefslogtreecommitdiffstats
path: root/gfx/brush.h
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-23 22:23:59 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-23 22:23:59 +0000
commit0f4fe844bd7ca7f0fa512a2e786d9debb2831526 (patch)
treef803b71c036a9fb0286298a366e682f65325d58d /gfx/brush.h
parent04dd9d9de68e20da43e7e2f13a550ea7c8ca6fa3 (diff)
downloadchromium_src-0f4fe844bd7ca7f0fa512a2e786d9debb2831526.zip
chromium_src-0f4fe844bd7ca7f0fa512a2e786d9debb2831526.tar.gz
chromium_src-0f4fe844bd7ca7f0fa512a2e786d9debb2831526.tar.bz2
Add support for brushes to gfx::Canvas... right now just LinearGradientBrush.
A native brush is created by gfx::Canvas::CreateLinearGradientBrush wrapped in a gfx::Brush. When gfx::Brush is deleted the platform wrapper frees the native brush. BUG=none TEST=see unittest. Review URL: http://codereview.chromium.org/3038019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53534 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx/brush.h')
-rw-r--r--gfx/brush.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/gfx/brush.h b/gfx/brush.h
new file mode 100644
index 0000000..0f6fbfb
--- /dev/null
+++ b/gfx/brush.h
@@ -0,0 +1,23 @@
+// Copyright (c) 2010 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 GFX_BRUSH_H_
+#define GFX_BRUSH_H_
+
+namespace gfx {
+
+// An object that encapsulates a platform native brush.
+// Subclasses handle memory management of the underlying native brush.
+class Brush {
+ public:
+ Brush() {}
+ virtual ~Brush() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Brush);
+};
+
+} // namespace gfx
+
+#endif // GFX_BRUSH_H_