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

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

Issue 784223007: Remove 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
« no previous file with comments | « include/core/SkCanvas.h ('k') | samplecode/SamplePictFile.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 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 private: 260 private:
256 const SkSurfaceProps fProps; 261 const SkSurfaceProps fProps;
257 const int fWidth; 262 const int fWidth;
258 const int fHeight; 263 const int fHeight;
259 uint32_t fGenerationID; 264 uint32_t fGenerationID;
260 265
261 typedef SkRefCnt INHERITED; 266 typedef SkRefCnt INHERITED;
262 }; 267 };
263 268
264 #endif 269 #endif
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | samplecode/SamplePictFile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698