| 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 "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "skia/ext/platform_device.h" | |
| 11 #include "third_party/skia/include/core/SkMetaData.h" | 10 #include "third_party/skia/include/core/SkMetaData.h" |
| 12 #include "third_party/skia/include/core/SkTypes.h" | 11 #include "third_party/skia/include/core/SkTypes.h" |
| 13 | 12 |
| 14 namespace { | 13 namespace { |
| 15 | 14 |
| 16 #if defined(OS_MACOSX) | 15 #if defined(OS_MACOSX) |
| 17 const char kIsPreviewMetafileKey[] = "CrIsPreviewMetafile"; | 16 const char kIsPreviewMetafileKey[] = "CrIsPreviewMetafile"; |
| 18 | 17 |
| 19 void SetBoolMetaData(const SkCanvas& canvas, const char* key, bool value) { | 18 void SetBoolMetaData(const SkCanvas& canvas, const char* key, bool value) { |
| 20 SkMetaData& meta = skia::GetMetaData(canvas); | 19 SkMetaData& meta = skia::GetMetaData(canvas); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 if (!is_opaque) | 102 if (!is_opaque) |
| 104 bitmap.eraseARGB(0, 0, 0, 0); | 103 bitmap.eraseARGB(0, 0, 0, 0); |
| 105 } | 104 } |
| 106 | 105 |
| 107 return base::MakeUnique<SkCanvas>(bitmap); | 106 return base::MakeUnique<SkCanvas>(bitmap); |
| 108 } | 107 } |
| 109 | 108 |
| 110 #endif | 109 #endif |
| 111 | 110 |
| 112 } // namespace skia | 111 } // namespace skia |
| OLD | NEW |