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 // 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 "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 // Returns the platform surface, or 0 if Allocate() did not return true. | 163 // Returns the platform surface, or 0 if Allocate() did not return true. |
164 PlatformSurface GetSurface() { return surface_; } | 164 PlatformSurface GetSurface() { return surface_; } |
165 | 165 |
166 // Return the skia bitmap, which will be empty if Allocate() did not | 166 // Return the skia bitmap, which will be empty if Allocate() did not |
167 // return true. | 167 // return true. |
168 const SkBitmap& GetBitmap() { return bitmap_; } | 168 const SkBitmap& GetBitmap() { return bitmap_; } |
169 | 169 |
170 private: | 170 private: |
171 SkBitmap bitmap_; | 171 SkBitmap bitmap_; |
172 PlatformSurface surface_; | 172 PlatformSurface surface_; // initialized to 0 |
| 173 intptr_t platform_extra_; // initialized to 0, specific to each platform |
173 | 174 |
174 DISALLOW_COPY_AND_ASSIGN(PlatformBitmap); | 175 DISALLOW_COPY_AND_ASSIGN(PlatformBitmap); |
175 }; | 176 }; |
176 | 177 |
177 } // namespace skia | 178 } // namespace skia |
178 | 179 |
179 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ | 180 #endif // SKIA_EXT_PLATFORM_CANVAS_H_ |
OLD | NEW |