| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 // Gives the pixmap passed in *writable* access to the pixels backing this | 105 // Gives the pixmap passed in *writable* access to the pixels backing this |
| 106 // canvas. All writes to the pixmap should be visible if the canvas is | 106 // canvas. All writes to the pixmap should be visible if the canvas is |
| 107 // raster-backed. | 107 // raster-backed. |
| 108 // | 108 // |
| 109 // Returns false on failure: if either argument is nullptr, or if the | 109 // Returns false on failure: if either argument is nullptr, or if the |
| 110 // pixels can not be retrieved from the canvas. In the latter case resets | 110 // pixels can not be retrieved from the canvas. In the latter case resets |
| 111 // the pixmap to empty. | 111 // the pixmap to empty. |
| 112 SK_API bool GetWritablePixels(SkCanvas* canvas, SkPixmap* pixmap); | 112 SK_API bool GetWritablePixels(SkCanvas* canvas, SkPixmap* pixmap); |
| 113 | 113 |
| 114 // Following routines are used in print preview workflow to mark the | |
| 115 // preview metafile. | |
| 116 SK_API SkMetaData& GetMetaData(const SkCanvas& canvas); | |
| 117 | |
| 118 #if defined(OS_MACOSX) | |
| 119 SK_API void SetIsPreviewMetafile(const SkCanvas& canvas, bool is_preview); | |
| 120 SK_API bool IsPreviewMetafile(const SkCanvas& canvas); | |
| 121 #endif | |
| 122 | |
| 123 } // namespace skia | 114 } // namespace skia |
| 124 | 115 |
| 125 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ | 116 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ |
| OLD | NEW |