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

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

Issue 790733003: remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 * If the requested surface cannot be created, or the request is not a 54 * If the requested surface cannot be created, or the request is not a
55 * supported configuration, NULL will be returned. 55 * supported configuration, NULL will be returned.
56 */ 56 */
57 static SkSurface* NewRaster(const SkImageInfo&, const SkSurfaceProps* = NULL ); 57 static SkSurface* NewRaster(const SkImageInfo&, const SkSurfaceProps* = NULL );
58 58
59 /** 59 /**
60 * Helper version of NewRaster. It creates a SkImageInfo with the 60 * Helper version of NewRaster. It creates a SkImageInfo with the
61 * specified width and height, and populates the rest of info to match 61 * specified width and height, and populates the rest of info to match
62 * pixels in SkPMColor format. 62 * pixels in SkPMColor format.
63 */ 63 */
64 #ifdef SK_SUPPORT_LEGACY_NewRasterPMColor
64 static SkSurface* NewRasterPMColor(int width, int height, const SkSurfacePro ps* props = NULL) { 65 static SkSurface* NewRasterPMColor(int width, int height, const SkSurfacePro ps* props = NULL) {
65 return NewRaster(SkImageInfo::MakeN32Premul(width, height), props); 66 return NewRaster(SkImageInfo::MakeN32Premul(width, height), props);
66 } 67 }
68 #endif
69 static SkSurface* NewRasterN32Premul(int width, int height, const SkSurfaceP rops* props = NULL) {
70 return NewRaster(SkImageInfo::MakeN32Premul(width, height), props);
71 }
67 72
68 /** 73 /**
69 * Return a new surface using the specified render target. 74 * Return a new surface using the specified render target.
70 */ 75 */
71 static SkSurface* NewRenderTargetDirect(GrRenderTarget*, const SkSurfaceProp s*); 76 static SkSurface* NewRenderTargetDirect(GrRenderTarget*, const SkSurfaceProp s*);
72 77
73 static SkSurface* NewRenderTargetDirect(GrRenderTarget* target) { 78 static SkSurface* NewRenderTargetDirect(GrRenderTarget* target) {
74 return NewRenderTargetDirect(target, NULL); 79 return NewRenderTargetDirect(target, NULL);
75 } 80 }
76 81
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 private: 231 private:
227 const SkSurfaceProps fProps; 232 const SkSurfaceProps fProps;
228 const int fWidth; 233 const int fWidth;
229 const int fHeight; 234 const int fHeight;
230 uint32_t fGenerationID; 235 uint32_t fGenerationID;
231 236
232 typedef SkRefCnt INHERITED; 237 typedef SkRefCnt INHERITED;
233 }; 238 };
234 239
235 #endif 240 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698