| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkCanvas_DEFINED | 8 #ifndef SkCanvas_DEFINED |
| 9 #define SkCanvas_DEFINED | 9 #define SkCanvas_DEFINED |
| 10 | 10 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 * sometimes. | 182 * sometimes. |
| 183 */ | 183 */ |
| 184 #ifndef SK_SUPPORT_LEGACY_GETTOPDEVICE | 184 #ifndef SK_SUPPORT_LEGACY_GETTOPDEVICE |
| 185 private: | 185 private: |
| 186 #endif | 186 #endif |
| 187 SkBaseDevice* getTopDevice(bool updateMatrixClip = false) const; | 187 SkBaseDevice* getTopDevice(bool updateMatrixClip = false) const; |
| 188 public: | 188 public: |
| 189 | 189 |
| 190 /** | 190 /** |
| 191 * Create a new surface matching the specified info, one that attempts to | 191 * Create a new surface matching the specified info, one that attempts to |
| 192 * be maximally compatible when used with this canvas. | 192 * be maximally compatible when used with this canvas. If there is no match
ing Surface type, |
| 193 * NULL is returned. |
| 193 */ | 194 */ |
| 194 SkSurface* newSurface(const SkImageInfo&); | 195 SkSurface* newSurface(const SkImageInfo&); |
| 195 | 196 |
| 196 /** | 197 /** |
| 197 * Return the GPU context of the device that is associated with the canvas. | 198 * Return the GPU context of the device that is associated with the canvas. |
| 198 * For a canvas with non-GPU device, NULL is returned. | 199 * For a canvas with non-GPU device, NULL is returned. |
| 199 */ | 200 */ |
| 200 GrContext* getGrContext(); | 201 GrContext* getGrContext(); |
| 201 | 202 |
| 202 /////////////////////////////////////////////////////////////////////////// | 203 /////////////////////////////////////////////////////////////////////////// |
| (...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 bool asROBitmap(SkBitmap*) const; | 1430 bool asROBitmap(SkBitmap*) const; |
| 1430 | 1431 |
| 1431 private: | 1432 private: |
| 1432 SkBitmap fBitmap; // used if peekPixels() fails | 1433 SkBitmap fBitmap; // used if peekPixels() fails |
| 1433 const void* fAddr; // NULL on failure | 1434 const void* fAddr; // NULL on failure |
| 1434 SkImageInfo fInfo; | 1435 SkImageInfo fInfo; |
| 1435 size_t fRowBytes; | 1436 size_t fRowBytes; |
| 1436 }; | 1437 }; |
| 1437 | 1438 |
| 1438 #endif | 1439 #endif |
| OLD | NEW |