OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrDrawContext_DEFINED | 8 #ifndef GrDrawContext_DEFINED |
9 #define GrDrawContext_DEFINED | 9 #define GrDrawContext_DEFINED |
10 | 10 |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 : SkSourceGammaTreatment::kIgnore; | 305 : SkSourceGammaTreatment::kIgnore; |
306 } | 306 } |
307 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } | 307 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } |
308 SkColorSpace* getColorSpace() const { return fColorSpace.get(); } | 308 SkColorSpace* getColorSpace() const { return fColorSpace.get(); } |
309 GrSurfaceOrigin origin() const { return fRenderTarget->origin(); } | 309 GrSurfaceOrigin origin() const { return fRenderTarget->origin(); } |
310 | 310 |
311 bool wasAbandoned() const; | 311 bool wasAbandoned() const; |
312 | 312 |
313 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } | 313 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } |
314 | 314 |
315 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; } | |
316 | |
317 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture());
} | 315 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture());
} |
318 | 316 |
319 // Provides access to functions that aren't part of the public API. | 317 // Provides access to functions that aren't part of the public API. |
320 GrDrawContextPriv drawContextPriv(); | 318 GrDrawContextPriv drawContextPriv(); |
321 const GrDrawContextPriv drawContextPriv() const; | 319 const GrDrawContextPriv drawContextPriv() const; |
322 | 320 |
323 GrAuditTrail* auditTrail() { return fAuditTrail; } | 321 GrAuditTrail* auditTrail() { return fAuditTrail; } |
324 | 322 |
325 protected: | 323 protected: |
326 GrDrawContext(GrContext*, GrDrawingManager*, sk_sp<GrRenderTarget>, sk_sp<Sk
ColorSpace>, | 324 GrDrawContext(GrContext*, GrDrawingManager*, sk_sp<GrRenderTarget>, sk_sp<Sk
ColorSpace>, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 | 395 |
398 sk_sp<SkColorSpace> fColorSpace; | 396 sk_sp<SkColorSpace> fColorSpace; |
399 SkSurfaceProps fSurfaceProps; | 397 SkSurfaceProps fSurfaceProps; |
400 GrAuditTrail* fAuditTrail; | 398 GrAuditTrail* fAuditTrail; |
401 | 399 |
402 // In debug builds we guard against improper thread handling | 400 // In debug builds we guard against improper thread handling |
403 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 401 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
404 }; | 402 }; |
405 | 403 |
406 #endif | 404 #endif |
OLD | NEW |