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

Unified Diff: skia/ext/platform_canvas.h

Issue 6081007: Start sorting methods in class declarations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 9 years, 11 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 | « skia/ext/convolver.h ('k') | skia/ext/vector_platform_device_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_canvas.h
diff --git a/skia/ext/platform_canvas.h b/skia/ext/platform_canvas.h
index 1e51717f90d5b41f80995b89a2d68584663fcf83..fd65fc05fed0edeb66d405b627f6e8e2d686585f 100644
--- a/skia/ext/platform_canvas.h
+++ b/skia/ext/platform_canvas.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -24,32 +24,15 @@ class PlatformCanvas : public SkCanvas {
// Set is_opaque if you are going to erase the bitmap and not use
// transparency: this will enable some optimizations.
PlatformCanvas(int width, int height, bool is_opaque);
- virtual ~PlatformCanvas();
#if defined(WIN32)
- // Windows ------------------------------------------------------------------
-
// The shared_section parameter is passed to gfx::PlatformDevice::create.
// See it for details.
PlatformCanvas(int width, int height, bool is_opaque, HANDLE shared_section);
-
- // For two-part init, call if you use the no-argument constructor above. Note
- // that we want this to optionally match the Linux initialize if you only
- // pass 3 arguments, hence the evil default argument.
- bool initialize(int width, int height, bool is_opaque,
- HANDLE shared_section = NULL);
-
#elif defined(__APPLE__)
- // Mac -----------------------------------------------------------------------
-
PlatformCanvas(int width, int height, bool is_opaque,
CGContextRef context);
PlatformCanvas(int width, int height, bool is_opaque, uint8_t* context);
-
- // For two-part init, call if you use the no-argument constructor above
- bool initialize(CGContextRef context, int width, int height, bool is_opaque);
- bool initialize(int width, int height, bool is_opaque, uint8_t* data = NULL);
-
#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
defined(__Solaris__)
// Linux ---------------------------------------------------------------------
@@ -57,11 +40,27 @@ class PlatformCanvas : public SkCanvas {
// Construct a canvas from the given memory region. The memory is not cleared
// first. @data must be, at least, @height * StrideForWidth(@width) bytes.
PlatformCanvas(int width, int height, bool is_opaque, uint8_t* data);
+#endif
+
+ virtual ~PlatformCanvas();
+#if defined(WIN32)
+ // For two-part init, call if you use the no-argument constructor above. Note
+ // that we want this to optionally match the Linux initialize if you only
+ // pass 3 arguments, hence the evil default argument.
+ bool initialize(int width, int height, bool is_opaque,
+ HANDLE shared_section = NULL);
+#elif defined(__APPLE__)
// For two-part init, call if you use the no-argument constructor above
+ bool initialize(CGContextRef context, int width, int height, bool is_opaque);
bool initialize(int width, int height, bool is_opaque, uint8_t* data = NULL);
+#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
+ defined(__Solaris__)
+ // For two-part init, call if you use the no-argument constructor above
+ bool initialize(int width, int height, bool is_opaque, uint8_t* data = NULL);
#endif
+
// Shared --------------------------------------------------------------------
// These calls should surround calls to platform drawing routines, the
@@ -99,6 +98,9 @@ class PlatformCanvas : public SkCanvas {
using SkCanvas::clipRect;
private:
+ // Helper method used internally by the initialize() methods.
+ bool initializeWithDevice(SkDevice* device);
+
// Unimplemented. This is to try to prevent people from calling this function
// on SkCanvas. SkCanvas' version is not virtual, so we can't prevent this
// 100%, but hopefully this will make people notice and not use the function.
@@ -107,9 +109,6 @@ class PlatformCanvas : public SkCanvas {
// CoreGraphics.
virtual SkDevice* setBitmapDevice(const SkBitmap& bitmap);
- // Helper method used internally by the initialize() methods.
- bool initializeWithDevice(SkDevice* device);
-
// Disallow copy and assign.
PlatformCanvas(const PlatformCanvas&);
PlatformCanvas& operator=(const PlatformCanvas&);
« no previous file with comments | « skia/ext/convolver.h ('k') | skia/ext/vector_platform_device_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698