| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 */ | 46 */ |
| 47 static SkSurface* NewRaster(const SkImage::Info&); | 47 static SkSurface* NewRaster(const SkImage::Info&); |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * Helper version of NewRaster. It creates a SkImage::Info with the | 50 * Helper version of NewRaster. It creates a SkImage::Info with the |
| 51 * specified width and height, and populates the rest of info to match | 51 * specified width and height, and populates the rest of info to match |
| 52 * pixels in SkPMColor format. | 52 * pixels in SkPMColor format. |
| 53 */ | 53 */ |
| 54 static SkSurface* NewRasterPMColor(int width, int height) { | 54 static SkSurface* NewRasterPMColor(int width, int height) { |
| 55 SkImage::Info info = { | 55 SkImage::Info info = { |
| 56 width, height, SkImage::kPMColor_ColorType, SkImage::kPremul_AlphaTy
pe | 56 width, height, SkImage::kPMColor_ColorType, kPremul_SkAlphaType |
| 57 }; | 57 }; |
| 58 return NewRaster(info); | 58 return NewRaster(info); |
| 59 } | 59 } |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * Return a new surface whose contents will be recorded into a picture. | 62 * Return a new surface whose contents will be recorded into a picture. |
| 63 * When this surface is drawn into another canvas, its contents will be | 63 * When this surface is drawn into another canvas, its contents will be |
| 64 * "replayed" into that canvas. | 64 * "replayed" into that canvas. |
| 65 */ | 65 */ |
| 66 static SkSurface* NewPicture(int width, int height); | 66 static SkSurface* NewPicture(int width, int height); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 private: | 162 private: |
| 163 const int fWidth; | 163 const int fWidth; |
| 164 const int fHeight; | 164 const int fHeight; |
| 165 uint32_t fGenerationID; | 165 uint32_t fGenerationID; |
| 166 | 166 |
| 167 typedef SkRefCnt INHERITED; | 167 typedef SkRefCnt INHERITED; |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 #endif | 170 #endif |
| OLD | NEW |