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 "skia/ext/platform_canvas.h" | 5 #include "skia/ext/platform_canvas.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "build/build_config.h" |
8 #include "skia/ext/bitmap_platform_device.h" | 9 #include "skia/ext/bitmap_platform_device.h" |
9 #include "skia/ext/platform_device.h" | 10 #include "skia/ext/platform_device.h" |
10 #include "third_party/skia/include/core/SkMetaData.h" | 11 #include "third_party/skia/include/core/SkMetaData.h" |
11 #include "third_party/skia/include/core/SkTypes.h" | 12 #include "third_party/skia/include/core/SkTypes.h" |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
15 #if defined(OS_MACOSX) | 16 #if defined(OS_MACOSX) |
16 const char kIsPreviewMetafileKey[] = "CrIsPreviewMetafile"; | 17 const char kIsPreviewMetafileKey[] = "CrIsPreviewMetafile"; |
17 | 18 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 SkBaseDevice* device = GetTopDevice(canvas); | 126 SkBaseDevice* device = GetTopDevice(canvas); |
126 PlatformDevice* platform_device = GetPlatformDevice(device); | 127 PlatformDevice* platform_device = GetPlatformDevice(device); |
127 return platform_device ? platform_device->GetBitmapContext() : | 128 return platform_device ? platform_device->GetBitmapContext() : |
128 nullptr; | 129 nullptr; |
129 } | 130 } |
130 | 131 |
131 #endif | 132 #endif |
132 | 133 |
133 | 134 |
134 } // namespace skia | 135 } // namespace skia |
OLD | NEW |