| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 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 SkSurface_DEFINED | 8 #ifndef SkSurface_DEFINED |
| 9 #define SkSurface_DEFINED | 9 #define SkSurface_DEFINED |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * a PDF or Picture canvas, the surface stores the recorded commands. | 23 * a PDF or Picture canvas, the surface stores the recorded commands. |
| 24 * | 24 * |
| 25 * To draw into a canvas, first create the appropriate type of Surface, and | 25 * To draw into a canvas, first create the appropriate type of Surface, and |
| 26 * then request the canvas from the surface. | 26 * then request the canvas from the surface. |
| 27 * | 27 * |
| 28 * SkSurface always has non-zero dimensions. If there is a request for a new su
rface, and either | 28 * SkSurface always has non-zero dimensions. If there is a request for a new su
rface, and either |
| 29 * of the requested dimensions are zero, then NULL will be returned. | 29 * of the requested dimensions are zero, then NULL will be returned. |
| 30 */ | 30 */ |
| 31 class SK_API SkSurface : public SkRefCnt { | 31 class SK_API SkSurface : public SkRefCnt { |
| 32 public: | 32 public: |
| 33 static const SkBudgeted kYes_Budgeted = SkBudgeted::kYes; | |
| 34 static const SkBudgeted kNo_Budgeted = SkBudgeted::kNo; | |
| 35 using Budgeted = SkBudgeted; | |
| 36 | |
| 37 /** | 33 /** |
| 38 * Create a new surface, using the specified pixels/rowbytes as its | 34 * Create a new surface, using the specified pixels/rowbytes as its |
| 39 * backend. | 35 * backend. |
| 40 * | 36 * |
| 41 * If the requested surface cannot be created, or the request is not a | 37 * If the requested surface cannot be created, or the request is not a |
| 42 * supported configuration, NULL will be returned. | 38 * supported configuration, NULL will be returned. |
| 43 */ | 39 */ |
| 44 static SkSurface* NewRasterDirect(const SkImageInfo&, void* pixels, size_t r
owBytes, | 40 static SkSurface* NewRasterDirect(const SkImageInfo&, void* pixels, size_t r
owBytes, |
| 45 const SkSurfaceProps* = NULL); | 41 const SkSurfaceProps* = NULL); |
| 46 | 42 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 private: | 307 private: |
| 312 const SkSurfaceProps fProps; | 308 const SkSurfaceProps fProps; |
| 313 const int fWidth; | 309 const int fWidth; |
| 314 const int fHeight; | 310 const int fHeight; |
| 315 uint32_t fGenerationID; | 311 uint32_t fGenerationID; |
| 316 | 312 |
| 317 typedef SkRefCnt INHERITED; | 313 typedef SkRefCnt INHERITED; |
| 318 }; | 314 }; |
| 319 | 315 |
| 320 #endif | 316 #endif |
| OLD | NEW |