| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 bool mustUseHWAA(const GrPaint& paint) const { | 262 bool mustUseHWAA(const GrPaint& paint) const { |
| 263 return paint.isAntiAlias() && fRenderTarget->isUnifiedMultisampled(); | 263 return paint.isAntiAlias() && fRenderTarget->isUnifiedMultisampled(); |
| 264 } | 264 } |
| 265 | 265 |
| 266 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } | 266 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } |
| 267 int width() const { return fRenderTarget->width(); } | 267 int width() const { return fRenderTarget->width(); } |
| 268 int height() const { return fRenderTarget->height(); } | 268 int height() const { return fRenderTarget->height(); } |
| 269 GrPixelConfig config() const { return fRenderTarget->config(); } | 269 GrPixelConfig config() const { return fRenderTarget->config(); } |
| 270 int numColorSamples() const { return fRenderTarget->numColorSamples(); } | 270 int numColorSamples() const { return fRenderTarget->numColorSamples(); } |
| 271 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } | 271 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } |
| 272 SkSourceGammaTreatment sourceGammaTreatment() const { |
| 273 return this->isGammaCorrect() ? SkSourceGammaTreatment::kRespect |
| 274 : SkSourceGammaTreatment::kIgnore; |
| 275 } |
| 272 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } | 276 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } |
| 273 SkColorSpace* getColorSpace() const { return fColorSpace.get(); } | 277 SkColorSpace* getColorSpace() const { return fColorSpace.get(); } |
| 274 | 278 |
| 275 bool wasAbandoned() const; | 279 bool wasAbandoned() const; |
| 276 | 280 |
| 277 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } | 281 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } |
| 278 | 282 |
| 279 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; } | 283 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; } |
| 280 | 284 |
| 281 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture());
} | 285 sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture());
} |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 366 |
| 363 sk_sp<SkColorSpace> fColorSpace; | 367 sk_sp<SkColorSpace> fColorSpace; |
| 364 SkSurfaceProps fSurfaceProps; | 368 SkSurfaceProps fSurfaceProps; |
| 365 GrAuditTrail* fAuditTrail; | 369 GrAuditTrail* fAuditTrail; |
| 366 | 370 |
| 367 // In debug builds we guard against improper thread handling | 371 // In debug builds we guard against improper thread handling |
| 368 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 372 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
| 369 }; | 373 }; |
| 370 | 374 |
| 371 #endif | 375 #endif |
| OLD | NEW |