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

Unified Diff: skia/ext/platform_device.cc

Issue 8052020: Revert 103021 - PrintPreview: Printing preview of a PDF on Mac with Skia only previews the last p... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
« no previous file with comments | « skia/ext/platform_device.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_device.cc
===================================================================
--- skia/ext/platform_device.cc (revision 103025)
+++ skia/ext/platform_device.cc (working copy)
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/logging.h"
#include "skia/ext/platform_device.h"
#include "third_party/skia/include/core/SkMetaData.h"
@@ -10,29 +9,9 @@
namespace skia {
namespace {
-
const char* kDevicePlatformBehaviour = "CrDevicePlatformBehaviour";
-const char* kDraftModeKey = "CrDraftMode";
-
-#if defined(OS_MACOSX) || defined(OS_WIN)
-const char* kIsPreviewMetafileKey = "CrIsPreviewMetafile";
-#endif
-
-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;
-}
-
-} // namespace
-
void SetPlatformDevice(SkDevice* device, PlatformDevice* platform_behaviour) {
SkMetaData& meta_data = device->getMetaData();
meta_data.setPtr(kDevicePlatformBehaviour, platform_behaviour);
@@ -48,30 +27,6 @@
return NULL;
}
-SkMetaData& getMetaData(const SkCanvas& canvas) {
- SkDevice* device = canvas.getDevice();
- DCHECK(device != NULL);
- return device->getMetaData();
-}
-
-void SetIsDraftMode(const SkCanvas& canvas, bool draft_mode) {
- SetBoolMetaData(canvas, kDraftModeKey, draft_mode);
-}
-
-bool IsDraftMode(const SkCanvas& canvas) {
- return GetBoolMetaData(canvas, kDraftModeKey);
-}
-
-#if defined(OS_MACOSX) || defined(OS_WIN)
-void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview) {
- SetBoolMetaData(canvas, kIsPreviewMetafileKey, is_preview);
-}
-
-bool IsPreviewMetafile(const SkCanvas& canvas) {
- return GetBoolMetaData(canvas, kIsPreviewMetafileKey);
-}
-#endif
-
bool PlatformDevice::IsNativeFontRenderingAllowed() {
return true;
}
« no previous file with comments | « skia/ext/platform_device.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698