| 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;
|
| }
|
|
|