| 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 /** |
| 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 Loading... |
| 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 |
| OLD | NEW |