diff options
author | 2017-05-01 13:12:20 -0400 | |
---|---|---|
committer | 2017-05-03 16:59:37 +0000 | |
commit | a91e0b7cc2537dc57ccf67914638e13b4612ffd1 (patch) | |
tree | 858fb3b4d98cb07461468f9b9ea1935f7950392e /src/gpu/GrPipeline.h | |
parent | 7eb86981a954c500fa4a4d8425496a5beb789e5d (diff) |
Allow TextureSamplers to have null GrTexture pointer
Bug: 715488
Change-Id: I69775cbb50d334d81872e236e59368fe65e698ff
Reviewed-on: https://skia-review.googlesource.com/14605
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrPipeline.h')
-rw-r--r-- | src/gpu/GrPipeline.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h index 01d375ec64..3bac5f79e0 100644 --- a/src/gpu/GrPipeline.h +++ b/src/gpu/GrPipeline.h @@ -213,6 +213,7 @@ public: bool isStencilEnabled() const { return SkToBool(fFlags & kStencilEnabled_Flag); } + bool isBad() const { return SkToBool(fFlags & kIsBad_Flag); } GrXferBarrierType xferBarrierType(const GrCaps& caps) const { if (fDstTexture.get() && fDstTexture.get() == fRenderTarget.get()->asTexture()) { @@ -229,11 +230,14 @@ public: GrDrawFace getDrawFace() const { return static_cast<GrDrawFace>(fDrawFace); } private: + void markAsBad() { fFlags |= kIsBad_Flag; } + /** This is a continuation of the public "Flags" enum. */ enum PrivateFlags { kUsesDistanceVectorField_Flag = 0x10, kHasStencilClip_Flag = 0x20, kStencilEnabled_Flag = 0x40, + kIsBad_Flag = 0x80, }; using RenderTarget = GrPendingIOResource<GrRenderTarget, kWrite_GrIOType>; |