| 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 #ifndef SKIA_EXT_PLATFORM_CANVAS_H_ | 5 #ifndef SKIA_EXT_PLATFORM_CANVAS_H_ |
| 6 #define SKIA_EXT_PLATFORM_CANVAS_H_ | 6 #define SKIA_EXT_PLATFORM_CANVAS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 ScopedPlatformPaint& operator=(const ScopedPlatformPaint&); | 147 ScopedPlatformPaint& operator=(const ScopedPlatformPaint&); |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 // Following routines are used in print preview workflow to mark the | 150 // Following routines are used in print preview workflow to mark the |
| 151 // preview metafile. | 151 // preview metafile. |
| 152 SK_API SkMetaData& GetMetaData(const SkCanvas& canvas); | 152 SK_API SkMetaData& GetMetaData(const SkCanvas& canvas); |
| 153 | 153 |
| 154 #if defined(OS_MACOSX) | 154 #if defined(OS_MACOSX) |
| 155 SK_API void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview); | 155 SK_API void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview); |
| 156 SK_API bool IsPreviewMetafile(const SkCanvas& canvas); | 156 SK_API bool IsPreviewMetafile(const SkCanvas& canvas); |
| 157 | |
| 158 // Returns the CGContext that backing the SkCanvas. | |
| 159 // Returns NULL if none is bound. | |
| 160 SK_API CGContextRef GetBitmapContext(const SkCanvas& canvas); | |
| 161 #endif | 157 #endif |
| 162 | 158 |
| 163 } // namespace skia | 159 } // namespace skia |
| 164 | 160 |
| 165 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ | 161 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ |
| OLD | NEW |