| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // The platform-specific device will include the necessary platform headers | 8 // The platform-specific device will include the necessary platform headers |
| 9 // to get the surface type. | 9 // to get the surface type. |
| 10 #include "skia/ext/platform_device.h" | 10 #include "skia/ext/platform_device.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #elif defined(__APPLE__) | 40 #elif defined(__APPLE__) |
| 41 // Mac ----------------------------------------------------------------------- | 41 // Mac ----------------------------------------------------------------------- |
| 42 | 42 |
| 43 PlatformCanvas(int width, int height, bool is_opaque, | 43 PlatformCanvas(int width, int height, bool is_opaque, |
| 44 CGContextRef context); | 44 CGContextRef context); |
| 45 PlatformCanvas(int width, int height, bool is_opaque, uint8_t* context); | 45 PlatformCanvas(int width, int height, bool is_opaque, uint8_t* context); |
| 46 | 46 |
| 47 // For two-part init, call if you use the no-argument constructor above | 47 // For two-part init, call if you use the no-argument constructor above |
| 48 bool initialize(int width, int height, bool is_opaque, uint8_t* data = NULL); | 48 bool initialize(int width, int height, bool is_opaque, uint8_t* data = NULL); |
| 49 | 49 |
| 50 #elif defined(__linux__) | 50 #elif defined(__linux__) || defined(__FreeBSD__) |
| 51 // Linux --------------------------------------------------------------------- | 51 // Linux --------------------------------------------------------------------- |
| 52 | 52 |
| 53 // Construct a canvas from the given memory region. The memory is not cleared | 53 // Construct a canvas from the given memory region. The memory is not cleared |
| 54 // first. @data must be, at least, @height * StrideForWidth(@width) bytes. | 54 // first. @data must be, at least, @height * StrideForWidth(@width) bytes. |
| 55 PlatformCanvas(int width, int height, bool is_opaque, uint8_t* data); | 55 PlatformCanvas(int width, int height, bool is_opaque, uint8_t* data); |
| 56 | 56 |
| 57 // For two-part init, call if you use the no-argument constructor above | 57 // For two-part init, call if you use the no-argument constructor above |
| 58 bool initialize(int width, int height, bool is_opaque, uint8_t* data = NULL); | 58 bool initialize(int width, int height, bool is_opaque, uint8_t* data = NULL); |
| 59 | 59 |
| 60 #endif | 60 #endif |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 virtual SkDevice* setBitmapDevice(const SkBitmap& bitmap); | 114 virtual SkDevice* setBitmapDevice(const SkBitmap& bitmap); |
| 115 | 115 |
| 116 // Disallow copy and assign. | 116 // Disallow copy and assign. |
| 117 PlatformCanvas(const PlatformCanvas&); | 117 PlatformCanvas(const PlatformCanvas&); |
| 118 PlatformCanvas& operator=(const PlatformCanvas&); | 118 PlatformCanvas& operator=(const PlatformCanvas&); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace skia | 121 } // namespace skia |
| 122 | 122 |
| 123 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ | 123 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ |
| OLD | NEW |