Chromium Code Reviews| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 /** | 105 /** |
| 106 * Used to wrap a pre-existing 3D API rendering target as a SkSurface. Skia will not assume | 106 * Used to wrap a pre-existing 3D API rendering target as a SkSurface. Skia will not assume |
| 107 * ownership of the render target and the client must ensure the render tar get is valid for the | 107 * ownership of the render target and the client must ensure the render tar get is valid for the |
| 108 * lifetime of the SkSurface. | 108 * lifetime of the SkSurface. |
| 109 */ | 109 */ |
| 110 static SkSurface* NewFromBackendRenderTarget(GrContext*, const GrBackendRend erTargetDesc&, | 110 static SkSurface* NewFromBackendRenderTarget(GrContext*, const GrBackendRend erTargetDesc&, |
| 111 const SkSurfaceProps*); | 111 const SkSurfaceProps*); |
| 112 | 112 |
| 113 /** | 113 /** |
| 114 * Return a new surface whose contents will be drawn to an offscreen | 114 * Return a new surface whose contents will be drawn to an offscreen |
| 115 * render target, allocated by the surface. | 115 * render target, allocated by the surface. |
|
bsalomon
2016/02/04 16:27:08
Put the comment here that the allocator will be re
erikchen
2016/02/04 18:44:07
Done.
| |
| 116 */ | 116 */ |
| 117 static SkSurface* NewRenderTarget(GrContext*, Budgeted, const SkImageInfo&, int sampleCount, | 117 static SkSurface* NewRenderTarget( |
| 118 const SkSurfaceProps* = NULL); | 118 GrContext*, Budgeted, const SkImageInfo&, int sampleCount, const SkS urfaceProps* = NULL, |
| 119 GrTextureStorageAllocator = GrTextureStorageAllocator()); | |
| 119 | 120 |
| 120 static SkSurface* NewRenderTarget(GrContext* gr, Budgeted b, const SkImageIn fo& info) { | 121 static SkSurface* NewRenderTarget(GrContext* gr, Budgeted b, const SkImageIn fo& info) { |
| 121 return NewRenderTarget(gr, b, info, 0, NULL); | 122 return NewRenderTarget(gr, b, info, 0); |
| 122 } | 123 } |
| 123 | 124 |
| 124 int width() const { return fWidth; } | 125 int width() const { return fWidth; } |
| 125 int height() const { return fHeight; } | 126 int height() const { return fHeight; } |
| 126 | 127 |
| 127 /** | 128 /** |
| 128 * Returns a unique non-zero, unique value identifying the content of this | 129 * Returns a unique non-zero, unique value identifying the content of this |
| 129 * surface. Each time the content is changed changed, either by drawing | 130 * surface. Each time the content is changed changed, either by drawing |
| 130 * into this surface, or explicitly calling notifyContentChanged()) this | 131 * into this surface, or explicitly calling notifyContentChanged()) this |
| 131 * method will return a new value. | 132 * method will return a new value. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 private: | 282 private: |
| 282 const SkSurfaceProps fProps; | 283 const SkSurfaceProps fProps; |
| 283 const int fWidth; | 284 const int fWidth; |
| 284 const int fHeight; | 285 const int fHeight; |
| 285 uint32_t fGenerationID; | 286 uint32_t fGenerationID; |
| 286 | 287 |
| 287 typedef SkRefCnt INHERITED; | 288 typedef SkRefCnt INHERITED; |
| 288 }; | 289 }; |
| 289 | 290 |
| 290 #endif | 291 #endif |
| OLD | NEW |