| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 * Return a new surface using the specified render target. | 66 * Return a new surface using the specified render target. |
| 67 */ | 67 */ |
| 68 static SkSurface* NewRenderTargetDirect(GrRenderTarget*); | 68 static SkSurface* NewRenderTargetDirect(GrRenderTarget*); |
| 69 | 69 |
| 70 /** | 70 /** |
| 71 * Return a new surface whose contents will be drawn to an offscreen | 71 * Return a new surface whose contents will be drawn to an offscreen |
| 72 * render target, allocated by the surface. | 72 * render target, allocated by the surface. |
| 73 */ | 73 */ |
| 74 static SkSurface* NewRenderTarget(GrContext*, const SkImageInfo&, int sample
Count = 0); | 74 static SkSurface* NewRenderTarget(GrContext*, const SkImageInfo&, int sample
Count = 0); |
| 75 | 75 |
| 76 /** |
| 77 * Return a new surface whose contents will be drawn to an offscreen |
| 78 * render target, allocated by the surface from the scratch texture pool |
| 79 * managed by the GrContext. |
| 80 */ |
| 81 static SkSurface* NewScratchRenderTarget(GrContext*, const SkImageInfo&, int
sampleCount = 0); |
| 82 |
| 76 int width() const { return fWidth; } | 83 int width() const { return fWidth; } |
| 77 int height() const { return fHeight; } | 84 int height() const { return fHeight; } |
| 78 | 85 |
| 79 /** | 86 /** |
| 80 * Returns a unique non-zero, unique value identifying the content of this | 87 * Returns a unique non-zero, unique value identifying the content of this |
| 81 * surface. Each time the content is changed changed, either by drawing | 88 * surface. Each time the content is changed changed, either by drawing |
| 82 * into this surface, or explicitly calling notifyContentChanged()) this | 89 * into this surface, or explicitly calling notifyContentChanged()) this |
| 83 * method will return a new value. | 90 * method will return a new value. |
| 84 * | 91 * |
| 85 * If this surface is empty (i.e. has a zero-dimention), this will return | 92 * If this surface is empty (i.e. has a zero-dimention), this will return |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 178 |
| 172 private: | 179 private: |
| 173 const int fWidth; | 180 const int fWidth; |
| 174 const int fHeight; | 181 const int fHeight; |
| 175 uint32_t fGenerationID; | 182 uint32_t fGenerationID; |
| 176 | 183 |
| 177 typedef SkRefCnt INHERITED; | 184 typedef SkRefCnt INHERITED; |
| 178 }; | 185 }; |
| 179 | 186 |
| 180 #endif | 187 #endif |
| OLD | NEW |