Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2716)

Unified Diff: app/gfx/canvas.h

Issue 113443: ChromeCanvas->gfx::Canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « app/app.vcproj ('k') | app/gfx/canvas.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/canvas.h
===================================================================
--- app/gfx/canvas.h (revision 16147)
+++ app/gfx/canvas.h (working copy)
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef APP_GFX_CHROME_CANVAS_H_
-#define APP_GFX_CHROME_CANVAS_H_
+#ifndef APP_GFX_CANVAS_H_
+#define APP_GFX_CANVAS_H_
#if defined(OS_WIN)
#include <windows.h>
@@ -14,19 +14,17 @@
#include "base/basictypes.h"
#include "skia/ext/platform_canvas.h"
+#if defined(OS_LINUX)
+typedef struct _cairo cairo_t;
+#endif
+
namespace gfx {
+
class Font;
class Rect;
-}
-#if defined(OS_LINUX)
-typedef struct _cairo cairo_t;
-#endif
-
-// ChromeCanvas is the SkCanvas used by Views for all painting. It
-// provides a handful of methods for the common operations used throughout
-// Views. With few exceptions, you should NOT create a ChromeCanvas directly,
-// rather one will be passed to you via the various paint methods in view.
+// Canvas is a SkCanvas subclass that provides a number of methods for common
+// operations used throughout an application built using base/gfx and app/gfx.
//
// All methods that take integer arguments (as is used throughout views)
// end with Int. If you need to use methods provided by the superclass
@@ -39,7 +37,7 @@
// source and destination colors are combined. Unless otherwise specified,
// the variant that does not take a SkPorterDuff::Mode uses a transfer mode
// of kSrcOver_Mode.
-class ChromeCanvas : public skia::PlatformCanvas {
+class Canvas : public skia::PlatformCanvas {
public:
// Specifies the alignment for text rendered with the DrawStringInt method.
enum {
@@ -69,13 +67,13 @@
CHARACTER_BREAK = 1024,
};
- // Creates an empty ChromeCanvas. Callers must use initialize before using
- // the canvas.
- ChromeCanvas();
+ // Creates an empty Canvas. Callers must use initialize before using the
+ // canvas.
+ Canvas();
- ChromeCanvas(int width, int height, bool is_opaque);
+ Canvas(int width, int height, bool is_opaque);
- virtual ~ChromeCanvas();
+ virtual ~Canvas();
// Retrieves the clip rectangle and sets it in the specified rectangle if any.
// Returns true if the clip rect is non-empty.
@@ -207,11 +205,13 @@
int flags);
#endif
- DISALLOW_EVIL_CONSTRUCTORS(ChromeCanvas);
+ DISALLOW_COPY_AND_ASSIGN(Canvas);
};
#if defined(OS_WIN) || defined(OS_LINUX)
-typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint;
+typedef skia::CanvasPaintT<Canvas> CanvasPaint;
#endif
-#endif // APP_GFX_CHROME_CANVAS_H_
+} // namespace gfx;
+
+#endif // #ifndef APP_GFX_CANVAS_H_
« no previous file with comments | « app/app.vcproj ('k') | app/gfx/canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698