| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 int height() const { return fRenderTarget->height(); } | 274 int height() const { return fRenderTarget->height(); } |
| 275 GrPixelConfig config() const { return fRenderTarget->config(); } | 275 GrPixelConfig config() const { return fRenderTarget->config(); } |
| 276 int numColorSamples() const { return fRenderTarget->numColorSamples(); } | 276 int numColorSamples() const { return fRenderTarget->numColorSamples(); } |
| 277 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } | 277 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } |
| 278 SkSourceGammaTreatment sourceGammaTreatment() const { | 278 SkSourceGammaTreatment sourceGammaTreatment() const { |
| 279 return this->isGammaCorrect() ? SkSourceGammaTreatment::kRespect | 279 return this->isGammaCorrect() ? SkSourceGammaTreatment::kRespect |
| 280 : SkSourceGammaTreatment::kIgnore; | 280 : SkSourceGammaTreatment::kIgnore; |
| 281 } | 281 } |
| 282 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } | 282 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } |
| 283 SkColorSpace* getColorSpace() const { return fColorSpace.get(); } | 283 SkColorSpace* getColorSpace() const { return fColorSpace.get(); } |
| 284 GrSurfaceOrigin origin() const { return fRenderTarget->origin(); } |
| 284 | 285 |
| 285 bool wasAbandoned() const; | 286 bool wasAbandoned() const; |
| 286 | 287 |
| 287 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } | 288 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } |
| 288 | 289 |
| 289 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; } | 290 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; } |
| 290 | 291 |
| 291 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture());
} | 292 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture());
} |
| 292 | 293 |
| 293 // Provides access to functions that aren't part of the public API. | 294 // Provides access to functions that aren't part of the public API. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 | 373 |
| 373 sk_sp<SkColorSpace> fColorSpace; | 374 sk_sp<SkColorSpace> fColorSpace; |
| 374 SkSurfaceProps fSurfaceProps; | 375 SkSurfaceProps fSurfaceProps; |
| 375 GrAuditTrail* fAuditTrail; | 376 GrAuditTrail* fAuditTrail; |
| 376 | 377 |
| 377 // In debug builds we guard against improper thread handling | 378 // In debug builds we guard against improper thread handling |
| 378 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 379 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
| 379 }; | 380 }; |
| 380 | 381 |
| 381 #endif | 382 #endif |
| OLD | NEW |