Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Side by Side Diff: include/core/SkSurface.h

Issue 24130009: promote SkImage::AlphaType to SkAlphaType (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/core/SkImage.h ('k') | samplecode/SampleFatBits.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « include/core/SkImage.h ('k') | samplecode/SampleFatBits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698