diff options
author | 2017-01-09 16:00:33 +0000 | |
---|---|---|
committer | 2017-01-09 16:08:13 +0000 | |
commit | 003312a211e65f35e402d6fe80a32e23d4c94ac4 (patch) | |
tree | 61635d3df8e7bf873c0ea08b211da03521b8a477 /src/gpu/GrPipelineBuilder.h | |
parent | a8f80de2bc17672b4b6f26d3cf6b38123ac850c9 (diff) |
Revert "Removing ref counting from GrXPFactory."
This reverts commit a8f80de2bc17672b4b6f26d3cf6b38123ac850c9.
Reason for revert: nanobench failing on windows bots, possibly others
Change-Id: Iacb8c650064a28654c165665be057377ffb02ba5
Reviewed-on: https://skia-review.googlesource.com/6802
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrPipelineBuilder.h')
-rw-r--r-- | src/gpu/GrPipelineBuilder.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h index 0d039f9040..1bc9002c70 100644 --- a/src/gpu/GrPipelineBuilder.h +++ b/src/gpu/GrPipelineBuilder.h @@ -145,15 +145,21 @@ public: * Installs a GrXPFactory. This object controls how src color, fractional pixel coverage, * and the dst color are blended. */ - void setXPFactory(const GrXPFactory* xpFactory) { fXPFactory = xpFactory; } + void setXPFactory(sk_sp<GrXPFactory> xpFactory) { + fXPFactory = std::move(xpFactory); + } /** * Sets a GrXPFactory that disables color writes to the destination. This is useful when * rendering to the stencil buffer. */ - void setDisableColorXPFactory() { fXPFactory = GrDisableColorXPFactory::Get(); } + void setDisableColorXPFactory() { + fXPFactory = GrDisableColorXPFactory::Make(); + } - const GrXPFactory* getXPFactory() const { return fXPFactory; } + const GrXPFactory* getXPFactory() const { + return fXPFactory.get(); + } /** * Checks whether the xp will need destination in a texture to correctly blend. @@ -298,7 +304,7 @@ private: uint32_t fFlags; const GrUserStencilSettings* fUserStencilSettings; GrDrawFace fDrawFace; - const GrXPFactory* fXPFactory; + mutable sk_sp<GrXPFactory> fXPFactory; FragmentProcessorArray fColorFragmentProcessors; FragmentProcessorArray fCoverageFragmentProcessors; |