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

Unified Diff: skia/ext/vector_canvas.h

Issue 6708046: Revert 78812 - Unfork VectorPlatformCanvas. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 9 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 | « printing/pdf_ps_metafile_cairo.cc ('k') | skia/ext/vector_canvas.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/vector_canvas.h
===================================================================
--- skia/ext/vector_canvas.h (revision 78814)
+++ skia/ext/vector_canvas.h (working copy)
@@ -7,21 +7,38 @@
#pragma once
#include "skia/ext/platform_canvas.h"
+#include "skia/ext/vector_platform_device.h"
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+typedef struct _cairo cairo_t;
+#endif
+
namespace skia {
-class PlatformDevice;
-
// This class is a specialization of the regular PlatformCanvas. It is designed
// to work with a VectorDevice to manage platform-specific drawing. It allows
// using both Skia operations and platform-specific operations. It *doesn't*
// support reading back from the bitmap backstore since it is not used.
class SK_API VectorCanvas : public PlatformCanvas {
public:
- // Ownership of |device| is transfered to VectorCanvas.
- explicit VectorCanvas(PlatformDevice* device);
+ VectorCanvas();
+ explicit VectorCanvas(SkDeviceFactory* factory);
+#if defined(WIN32)
+ VectorCanvas(HDC dc, int width, int height);
+#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ // Caller owns |context|. Ownership is not transferred.
+ VectorCanvas(cairo_t* context, int width, int height);
+#endif
virtual ~VectorCanvas();
+ // For two-part init, call if you use the no-argument constructor above
+#if defined(WIN32)
+ bool initialize(HDC context, int width, int height);
+#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ // Ownership of |context| is not transferred.
+ bool initialize(cairo_t* context, int width, int height);
+#endif
+
virtual SkBounder* setBounder(SkBounder* bounder);
virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter);
« no previous file with comments | « printing/pdf_ps_metafile_cairo.cc ('k') | skia/ext/vector_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698