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

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

Issue 351373005: add SkSurface::NewRasterDirectReleaseProc (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | src/image/SkSurface_Raster.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 20 matching lines...) Expand all
31 /** 31 /**
32 * Create a new surface, using the specified pixels/rowbytes as its 32 * Create a new surface, using the specified pixels/rowbytes as its
33 * backend. 33 * backend.
34 * 34 *
35 * If the requested surface cannot be created, or the request is not a 35 * If the requested surface cannot be created, or the request is not a
36 * supported configuration, NULL will be returned. 36 * supported configuration, NULL will be returned.
37 */ 37 */
38 static SkSurface* NewRasterDirect(const SkImageInfo&, void* pixels, size_t r owBytes); 38 static SkSurface* NewRasterDirect(const SkImageInfo&, void* pixels, size_t r owBytes);
39 39
40 /** 40 /**
41 * The same as NewRasterDirect, but also accepts a call-back routine, which is invoked
42 * when the surface is deleted, and is passed the pixel memory and the spec ified context.
43 */
44 static SkSurface* NewRasterDirectReleaseProc(const SkImageInfo&, void* pixel s, size_t rowBytes,
45 void (*releaseProc)(void* pixel s, void* context),
46 void* context);
47
48 /**
41 * Return a new surface, with the memory for the pixels automatically 49 * Return a new surface, with the memory for the pixels automatically
42 * allocated. 50 * allocated.
43 * 51 *
44 * If the requested surface cannot be created, or the request is not a 52 * If the requested surface cannot be created, or the request is not a
45 * supported configuration, NULL will be returned. 53 * supported configuration, NULL will be returned.
46 */ 54 */
47 static SkSurface* NewRaster(const SkImageInfo&); 55 static SkSurface* NewRaster(const SkImageInfo&);
48 56
49 /** 57 /**
50 * Helper version of NewRaster. It creates a SkImageInfo with the 58 * Helper version of NewRaster. It creates a SkImageInfo with the
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 203
196 private: 204 private:
197 const int fWidth; 205 const int fWidth;
198 const int fHeight; 206 const int fHeight;
199 uint32_t fGenerationID; 207 uint32_t fGenerationID;
200 208
201 typedef SkRefCnt INHERITED; 209 typedef SkRefCnt INHERITED;
202 }; 210 };
203 211
204 #endif 212 #endif
OLDNEW
« no previous file with comments | « no previous file | src/image/SkSurface_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698