OLD | NEW |
---|---|
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 Loading... | |
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 /** Used to wrap a pre-existing backend 3D API texture in a SkSurface. The k RenderTarget flag | |
reed1
2015/04/08 15:09:41
nit: comment style...
/**
*
*/
bsalomon
2015/04/08 15:14:17
Done.
| |
98 must be set on GrBackendTextureDesc for this to succeed. */ | |
99 static SkSurface* NewWrappedRenderTarget(GrContext*, GrBackendTextureDesc, | |
100 const SkSurfaceProps*); | |
96 | 101 |
97 /** | 102 /** |
98 * Return a new surface whose contents will be drawn to an offscreen | 103 * Return a new surface whose contents will be drawn to an offscreen |
99 * render target, allocated by the surface. | 104 * render target, allocated by the surface. |
100 */ | 105 */ |
101 static SkSurface* NewRenderTarget(GrContext*, Budgeted, const SkImageInfo&, int sampleCount, | 106 static SkSurface* NewRenderTarget(GrContext*, Budgeted, const SkImageInfo&, int sampleCount, |
102 const SkSurfaceProps* = NULL); | 107 const SkSurfaceProps* = NULL); |
103 | 108 |
104 static SkSurface* NewRenderTarget(GrContext* gr, Budgeted b, const SkImageIn fo& info) { | 109 static SkSurface* NewRenderTarget(GrContext* gr, Budgeted b, const SkImageIn fo& info) { |
105 return NewRenderTarget(gr, b, info, 0, NULL); | 110 return NewRenderTarget(gr, b, info, 0, NULL); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 private: | 234 private: |
230 const SkSurfaceProps fProps; | 235 const SkSurfaceProps fProps; |
231 const int fWidth; | 236 const int fWidth; |
232 const int fHeight; | 237 const int fHeight; |
233 uint32_t fGenerationID; | 238 uint32_t fGenerationID; |
234 | 239 |
235 typedef SkRefCnt INHERITED; | 240 typedef SkRefCnt INHERITED; |
236 }; | 241 }; |
237 | 242 |
238 #endif | 243 #endif |
OLD | NEW |