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

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

Issue 1071603002: Add helper for creating a SkSurface from a client created texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comment style Created 5 years, 8 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.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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 87
88 /** 88 /**
89 * Return a new surface using the specified render target. 89 * Return a new surface using the specified render target.
90 */ 90 */
91 static SkSurface* NewRenderTargetDirect(GrRenderTarget*, const SkSurfaceProp s*); 91 static SkSurface* NewRenderTargetDirect(GrRenderTarget*, const SkSurfaceProp s*);
92 92
93 static SkSurface* NewRenderTargetDirect(GrRenderTarget* target) { 93 static SkSurface* NewRenderTargetDirect(GrRenderTarget* target) {
94 return NewRenderTargetDirect(target, NULL); 94 return NewRenderTargetDirect(target, NULL);
95 } 95 }
96
97 /**
98 * Used to wrap a pre-existing backend 3D API texture in a SkSurface. The k RenderTarget flag
99 * must be set on GrBackendTextureDesc for this to succeed.
100 */
101 static SkSurface* NewWrappedRenderTarget(GrContext*, GrBackendTextureDesc,
102 const SkSurfaceProps*);
96 103
97 /** 104 /**
98 * Return a new surface whose contents will be drawn to an offscreen 105 * Return a new surface whose contents will be drawn to an offscreen
99 * render target, allocated by the surface. 106 * render target, allocated by the surface.
100 */ 107 */
101 static SkSurface* NewRenderTarget(GrContext*, Budgeted, const SkImageInfo&, int sampleCount, 108 static SkSurface* NewRenderTarget(GrContext*, Budgeted, const SkImageInfo&, int sampleCount,
102 const SkSurfaceProps* = NULL); 109 const SkSurfaceProps* = NULL);
103 110
104 static SkSurface* NewRenderTarget(GrContext* gr, Budgeted b, const SkImageIn fo& info) { 111 static SkSurface* NewRenderTarget(GrContext* gr, Budgeted b, const SkImageIn fo& info) {
105 return NewRenderTarget(gr, b, info, 0, NULL); 112 return NewRenderTarget(gr, b, info, 0, NULL);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 private: 236 private:
230 const SkSurfaceProps fProps; 237 const SkSurfaceProps fProps;
231 const int fWidth; 238 const int fWidth;
232 const int fHeight; 239 const int fHeight;
233 uint32_t fGenerationID; 240 uint32_t fGenerationID;
234 241
235 typedef SkRefCnt INHERITED; 242 typedef SkRefCnt INHERITED;
236 }; 243 };
237 244
238 #endif 245 #endif
OLDNEW
« no previous file with comments | « no previous file | src/image/SkSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698