| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 | 267 |
| 268 bool mustUseHWAA(const GrPaint& paint) const { | 268 bool mustUseHWAA(const GrPaint& paint) const { |
| 269 return paint.isAntiAlias() && fRenderTarget->isUnifiedMultisampled(); | 269 return paint.isAntiAlias() && fRenderTarget->isUnifiedMultisampled(); |
| 270 } | 270 } |
| 271 | 271 |
| 272 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } | 272 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } |
| 273 int width() const { return fRenderTarget->width(); } | 273 int width() const { return fRenderTarget->width(); } |
| 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 SkToBool(fColorSpace.get()); } |
| 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 | 284 |
| 285 bool wasAbandoned() const; | 285 bool wasAbandoned() const; |
| 286 | 286 |
| 287 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } | 287 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 | 372 |
| 373 sk_sp<SkColorSpace> fColorSpace; | 373 sk_sp<SkColorSpace> fColorSpace; |
| 374 SkSurfaceProps fSurfaceProps; | 374 SkSurfaceProps fSurfaceProps; |
| 375 GrAuditTrail* fAuditTrail; | 375 GrAuditTrail* fAuditTrail; |
| 376 | 376 |
| 377 // In debug builds we guard against improper thread handling | 377 // In debug builds we guard against improper thread handling |
| 378 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 378 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
| 379 }; | 379 }; |
| 380 | 380 |
| 381 #endif | 381 #endif |
| OLD | NEW |