| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrContext_DEFINED | 8 #ifndef GrContext_DEFINED |
| 9 #define GrContext_DEFINED | 9 #define GrContext_DEFINED |
| 10 | 10 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 * | 188 * |
| 189 * @param rt the render target receiving the draws | 189 * @param rt the render target receiving the draws |
| 190 * @param surfaceProps the surface properties (mainly defines text drawing) | 190 * @param surfaceProps the surface properties (mainly defines text drawing) |
| 191 * | 191 * |
| 192 * @return a draw context | 192 * @return a draw context |
| 193 */ | 193 */ |
| 194 sk_sp<GrDrawContext> drawContext(sk_sp<GrRenderTarget> rt, const SkSurfacePr
ops* = nullptr); | 194 sk_sp<GrDrawContext> drawContext(sk_sp<GrRenderTarget> rt, const SkSurfacePr
ops* = nullptr); |
| 195 | 195 |
| 196 /** | 196 /** |
| 197 * Create both a GrRenderTarget and a matching GrDrawContext to wrap it. | 197 * Create both a GrRenderTarget and a matching GrDrawContext to wrap it. |
| 198 * The created GrRenderTarget will always be budgeted. | |
| 199 * We guarantee that "asTexture" will succeed for drawContexts created | 198 * We guarantee that "asTexture" will succeed for drawContexts created |
| 200 * via this entry point. | 199 * via this entry point. |
| 201 */ | 200 */ |
| 202 sk_sp<GrDrawContext> newDrawContext(SkBackingFit fit, | 201 sk_sp<GrDrawContext> newDrawContext(SkBackingFit fit, |
| 203 int width, int height, | 202 int width, int height, |
| 204 GrPixelConfig config, | 203 GrPixelConfig config, |
| 205 int sampleCnt = 0, | 204 int sampleCnt = 0, |
| 206 GrSurfaceOrigin origin = kDefault_GrSurf
aceOrigin, | 205 GrSurfaceOrigin origin = kDefault_GrSurf
aceOrigin, |
| 207 const SkSurfaceProps* surfaceProps = nul
lptr); | 206 const SkSurfaceProps* surfaceProps = nul
lptr, |
| 207 SkBudgeted = SkBudgeted::kYes); |
| 208 | 208 |
| 209 /////////////////////////////////////////////////////////////////////////// | 209 /////////////////////////////////////////////////////////////////////////// |
| 210 // Misc. | 210 // Misc. |
| 211 | 211 |
| 212 /** | 212 /** |
| 213 * Flags that affect flush() behavior. | 213 * Flags that affect flush() behavior. |
| 214 */ | 214 */ |
| 215 enum FlushBits { | 215 enum FlushBits { |
| 216 /** | 216 /** |
| 217 * A client may reach a point where it has partially rendered a frame | 217 * A client may reach a point where it has partially rendered a frame |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 SkAutoTUnref<const GrCaps> fCaps; | 498 SkAutoTUnref<const GrCaps> fCaps; |
| 499 uint32_t fContextUniqueID; | 499 uint32_t fContextUniqueID; |
| 500 | 500 |
| 501 friend class GrContext; | 501 friend class GrContext; |
| 502 friend class SkImage; | 502 friend class SkImage; |
| 503 | 503 |
| 504 typedef SkRefCnt INHERITED; | 504 typedef SkRefCnt INHERITED; |
| 505 }; | 505 }; |
| 506 | 506 |
| 507 #endif | 507 #endif |
| OLD | NEW |