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

Unified Diff: skia/ext/vector_canvas.h

Issue 172115: Pass printing result to the browser.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 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
Index: skia/ext/vector_canvas.h
===================================================================
--- skia/ext/vector_canvas.h (revision 25608)
+++ skia/ext/vector_canvas.h (working copy)
@@ -8,6 +8,10 @@
#include "skia/ext/platform_canvas.h"
#include "skia/ext/vector_platform_device.h"
+#if defined(__linux__)
+typedef struct _cairo cairo_t;
+#endif
+
namespace skia {
// This class is a specialization of the regular PlatformCanvas. It is designed
@@ -20,7 +24,8 @@
#if defined(WIN32)
VectorCanvas(HDC dc, int width, int height);
#elif defined(__linux__)
- VectorCanvas(int width, int height);
+ // Caller owns |context|. Ownership is not transferred.
+ VectorCanvas(cairo_t* context, int width, int height);
#endif
virtual ~VectorCanvas();
@@ -28,10 +33,11 @@
#if defined(WIN32)
bool initialize(HDC context, int width, int height);
#elif defined(__linux__)
- bool initialize(int width, int height);
+ // Ownership of |context| is not transferred.
+ bool initialize(cairo_t* context, int width, int height);
#endif
- virtual SkBounder* setBounder(SkBounder*);
+ virtual SkBounder* setBounder(SkBounder* bounder);
#if defined(WIN32) || defined(__linux__)
virtual SkDevice* createDevice(SkBitmap::Config config,
int width, int height,
@@ -40,12 +46,15 @@
virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter);
private:
- // |is_opaque| is unused. |shared_section| is in fact the HDC used for output.
#if defined(WIN32)
+ // |shared_section| is in fact the HDC used for output. |is_opaque| is unused.
virtual SkDevice* createPlatformDevice(int width, int height, bool is_opaque,
HANDLE shared_section);
#elif defined(__linux__)
- virtual SkDevice* createPlatformDevice(int width, int height, bool is_opaque);
+ // Ownership of |context| is not transferred. |is_opaque| is unused.
+ virtual SkDevice* createPlatformDevice(cairo_t* context,
+ int width, int height,
+ bool is_opaque);
#endif
// Returns true if the top device is vector based and not bitmap based.

Powered by Google App Engine
This is Rietveld 408576698