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

Unified Diff: skia/ext/platform_canvas.cc

Issue 2686033005: Move metafile printing code from platform canvas to PaintCanvas (Closed)
Patch Set: Fix missing build_config include Created 3 years, 10 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/platform_canvas.h ('k') | third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_canvas.cc
diff --git a/skia/ext/platform_canvas.cc b/skia/ext/platform_canvas.cc
index e1b63099e6493ecc1644d93d051c04f4c300553c..288e391dc5eb04619ecd180d2a8ac53e233cd304 100644
--- a/skia/ext/platform_canvas.cc
+++ b/skia/ext/platform_canvas.cc
@@ -10,27 +10,6 @@
#include "third_party/skia/include/core/SkMetaData.h"
#include "third_party/skia/include/core/SkTypes.h"
-namespace {
-
-#if defined(OS_MACOSX)
-const char kIsPreviewMetafileKey[] = "CrIsPreviewMetafile";
-
-void SetBoolMetaData(const SkCanvas& canvas, const char* key, bool value) {
- SkMetaData& meta = skia::GetMetaData(canvas);
- meta.setBool(key, value);
-}
-
-bool GetBoolMetaData(const SkCanvas& canvas, const char* key) {
- bool value;
- SkMetaData& meta = skia::GetMetaData(canvas);
- if (!meta.findBool(key, &value))
- value = false;
- return value;
-}
-#endif
-
-} // namespace
-
namespace skia {
SkBitmap ReadPixels(SkCanvas* canvas) {
@@ -61,20 +40,6 @@ size_t PlatformCanvasStrideForWidth(unsigned width) {
return 4 * width;
}
-SkMetaData& GetMetaData(const SkCanvas& canvas) {
- return const_cast<SkCanvas&>(canvas).getMetaData();
-}
-
-#if defined(OS_MACOSX)
-void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview) {
- SetBoolMetaData(canvas, kIsPreviewMetafileKey, is_preview);
-}
-
-bool IsPreviewMetafile(const SkCanvas& canvas) {
- return GetBoolMetaData(canvas, kIsPreviewMetafileKey);
-}
-#endif
-
#if !defined(WIN32)
std::unique_ptr<SkCanvas> CreatePlatformCanvasWithPixels(
« no previous file with comments | « skia/ext/platform_canvas.h ('k') | third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698