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

Unified Diff: skia/ext/platform_canvas.h

Issue 1462163002: Move uncoupled code out of skia/ext/platform_device.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-draft-metadata
Patch Set: Trim superfluous SK_API Created 5 years, 1 month 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/printed_document.cc ('k') | skia/ext/platform_canvas.cc » ('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 c46d6c4cc0cec94356a0e419df5fe70e2021dc15..61f5a877d49b21a1b970a2703e4cc273ec45befe 100644
--- a/skia/ext/platform_canvas.h
+++ b/skia/ext/platform_canvas.h
@@ -8,13 +8,15 @@
// The platform-specific device will include the necessary platform headers
// to get the surface type.
#include "base/basictypes.h"
-#include "skia/ext/platform_device.h"
+#include "skia/ext/platform_surface.h"
#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPixelRef.h"
#include "third_party/skia/include/core/SkPixmap.h"
+class SkBaseDevice;
+
namespace skia {
typedef SkCanvas PlatformCanvas;
@@ -171,6 +173,19 @@ class SK_API ScopedPlatformPaint {
ScopedPlatformPaint& operator=(const ScopedPlatformPaint&);
};
+// Following routines are used in print preview workflow to mark the
+// preview metafile.
+SK_API SkMetaData& GetMetaData(const SkCanvas& canvas);
+
+#if defined(OS_MACOSX)
+SK_API void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview);
+SK_API bool IsPreviewMetafile(const SkCanvas& canvas);
+
+// Returns the CGContext that backing the SkCanvas.
+// Returns NULL if none is bound.
+SK_API CGContextRef GetBitmapContext(const SkCanvas& canvas);
+#endif
+
} // namespace skia
#endif // SKIA_EXT_PLATFORM_CANVAS_H_
« no previous file with comments | « printing/printed_document.cc ('k') | skia/ext/platform_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698