| 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 |
| 11 #include "GrColor.h" | 11 #include "GrColor.h" |
| 12 #include "GrContext.h" |
| 12 #include "GrPaint.h" | 13 #include "GrPaint.h" |
| 13 #include "GrRenderTarget.h" | 14 #include "GrRenderTarget.h" |
| 14 #include "SkRefCnt.h" | 15 #include "SkRefCnt.h" |
| 15 #include "SkRegion.h" | 16 #include "SkRegion.h" |
| 16 #include "SkSurfaceProps.h" | 17 #include "SkSurfaceProps.h" |
| 17 #include "../private/GrInstancedPipelineInfo.h" | 18 #include "../private/GrInstancedPipelineInfo.h" |
| 18 #include "../private/GrSingleOwner.h" | 19 #include "../private/GrSingleOwner.h" |
| 19 | 20 |
| 20 class GrAuditTrail; | 21 class GrAuditTrail; |
| 21 class GrClip; | 22 class GrClip; |
| 22 class GrContext; | |
| 23 class GrDrawBatch; | 23 class GrDrawBatch; |
| 24 class GrDrawContextPriv; | 24 class GrDrawContextPriv; |
| 25 class GrDrawPathBatchBase; | 25 class GrDrawPathBatchBase; |
| 26 class GrDrawingManager; | 26 class GrDrawingManager; |
| 27 class GrDrawTarget; | 27 class GrDrawTarget; |
| 28 class GrFixedClip; | 28 class GrFixedClip; |
| 29 class GrPaint; | 29 class GrPaint; |
| 30 class GrPathProcessor; | 30 class GrPathProcessor; |
| 31 class GrPipelineBuilder; | 31 class GrPipelineBuilder; |
| 32 class GrRenderTarget; | 32 class GrRenderTarget; |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 bool isStencilBufferMultisampled() const { | 316 bool isStencilBufferMultisampled() const { |
| 317 return fRenderTarget->isStencilBufferMultisampled(); | 317 return fRenderTarget->isStencilBufferMultisampled(); |
| 318 } | 318 } |
| 319 bool isUnifiedMultisampled() const { return fRenderTarget->isUnifiedMultisam
pled(); } | 319 bool isUnifiedMultisampled() const { return fRenderTarget->isUnifiedMultisam
pled(); } |
| 320 bool hasMixedSamples() const { return fRenderTarget->isMixedSampled(); } | 320 bool hasMixedSamples() const { return fRenderTarget->isMixedSampled(); } |
| 321 | 321 |
| 322 bool mustUseHWAA(const GrPaint& paint) const { | 322 bool mustUseHWAA(const GrPaint& paint) const { |
| 323 return paint.isAntiAlias() && fRenderTarget->isUnifiedMultisampled(); | 323 return paint.isAntiAlias() && fRenderTarget->isUnifiedMultisampled(); |
| 324 } | 324 } |
| 325 | 325 |
| 326 const GrCaps* caps() const { return fContext->caps(); } |
| 326 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } | 327 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } |
| 327 int width() const { return fRenderTarget->width(); } | 328 int width() const { return fRenderTarget->width(); } |
| 328 int height() const { return fRenderTarget->height(); } | 329 int height() const { return fRenderTarget->height(); } |
| 329 GrPixelConfig config() const { return fRenderTarget->config(); } | 330 GrPixelConfig config() const { return fRenderTarget->config(); } |
| 330 int numColorSamples() const { return fRenderTarget->numColorSamples(); } | 331 int numColorSamples() const { return fRenderTarget->numColorSamples(); } |
| 331 bool isGammaCorrect() const { return SkToBool(fColorSpace.get()); } | 332 bool isGammaCorrect() const { return SkToBool(fColorSpace.get()); } |
| 332 SkSourceGammaTreatment sourceGammaTreatment() const { | 333 SkSourceGammaTreatment sourceGammaTreatment() const { |
| 333 return this->isGammaCorrect() ? SkSourceGammaTreatment::kRespect | 334 return this->isGammaCorrect() ? SkSourceGammaTreatment::kRespect |
| 334 : SkSourceGammaTreatment::kIgnore; | 335 : SkSourceGammaTreatment::kIgnore; |
| 335 } | 336 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 sk_sp<SkColorSpace> fColorSpace; | 429 sk_sp<SkColorSpace> fColorSpace; |
| 429 sk_sp<GrColorSpaceXform> fColorXformFromSRGB; | 430 sk_sp<GrColorSpaceXform> fColorXformFromSRGB; |
| 430 SkSurfaceProps fSurfaceProps; | 431 SkSurfaceProps fSurfaceProps; |
| 431 GrAuditTrail* fAuditTrail; | 432 GrAuditTrail* fAuditTrail; |
| 432 | 433 |
| 433 // In debug builds we guard against improper thread handling | 434 // In debug builds we guard against improper thread handling |
| 434 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 435 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
| 435 }; | 436 }; |
| 436 | 437 |
| 437 #endif | 438 #endif |
| OLD | NEW |