OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/logging.h" | 5 #include "base/logging.h" |
6 #include "skia/ext/platform_device.h" | 6 #include "skia/ext/platform_device.h" |
7 | 7 |
8 #include "third_party/skia/include/core/SkMetaData.h" | 8 #include "third_party/skia/include/core/SkMetaData.h" |
9 | 9 |
10 namespace skia { | 10 namespace skia { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 #if defined(OS_MACOSX) || defined(OS_WIN) | 66 #if defined(OS_MACOSX) || defined(OS_WIN) |
67 void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview) { | 67 void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview) { |
68 SetBoolMetaData(canvas, kIsPreviewMetafileKey, is_preview); | 68 SetBoolMetaData(canvas, kIsPreviewMetafileKey, is_preview); |
69 } | 69 } |
70 | 70 |
71 bool IsPreviewMetafile(const SkCanvas& canvas) { | 71 bool IsPreviewMetafile(const SkCanvas& canvas) { |
72 return GetBoolMetaData(canvas, kIsPreviewMetafileKey); | 72 return GetBoolMetaData(canvas, kIsPreviewMetafileKey); |
73 } | 73 } |
74 #endif | 74 #endif |
75 | 75 |
| 76 // For platforms without "platform_device_*" specific files, |
| 77 // include default behaviors for necessary methods to compile. |
| 78 #if defined(OS_NACL) |
| 79 PlatformSurface PlatformDevice::BeginPlatformPaint() { |
| 80 return NULL; |
| 81 } |
| 82 |
| 83 void PlatformDevice::EndPlatformPaint() { |
| 84 // By default, do nothing here. |
| 85 } |
| 86 #endif |
| 87 |
76 bool PlatformDevice::SupportsPlatformPaint() { | 88 bool PlatformDevice::SupportsPlatformPaint() { |
77 return true; | 89 return true; |
78 } | 90 } |
79 | 91 |
80 } // namespace skia | 92 } // namespace skia |
OLD | NEW |