From a16339297859f37df69230e64f05624cef511ad3 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 9 Jan 2017 11:46:10 -0500 Subject: Revert "Revert "Removing ref counting from GrXPFactory."" This reverts commit 003312a211e65f35e402d6fe80a32e23d4c94ac4. Change-Id: Ib41065e5c356d1dd99e70fa10611ac6756c2b79d Reviewed-on: https://skia-review.googlesource.com/6803 Reviewed-by: Brian Salomon Commit-Queue: Brian Salomon --- src/gpu/GrPipelineBuilder.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/gpu/GrPipelineBuilder.h') diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h index 1bc9002c70..0d039f9040 100644 --- a/src/gpu/GrPipelineBuilder.h +++ b/src/gpu/GrPipelineBuilder.h @@ -145,21 +145,15 @@ public: * Installs a GrXPFactory. This object controls how src color, fractional pixel coverage, * and the dst color are blended. */ - void setXPFactory(sk_sp xpFactory) { - fXPFactory = std::move(xpFactory); - } + void setXPFactory(const GrXPFactory* xpFactory) { fXPFactory = xpFactory; } /** * Sets a GrXPFactory that disables color writes to the destination. This is useful when * rendering to the stencil buffer. */ - void setDisableColorXPFactory() { - fXPFactory = GrDisableColorXPFactory::Make(); - } + void setDisableColorXPFactory() { fXPFactory = GrDisableColorXPFactory::Get(); } - const GrXPFactory* getXPFactory() const { - return fXPFactory.get(); - } + const GrXPFactory* getXPFactory() const { return fXPFactory; } /** * Checks whether the xp will need destination in a texture to correctly blend. @@ -304,7 +298,7 @@ private: uint32_t fFlags; const GrUserStencilSettings* fUserStencilSettings; GrDrawFace fDrawFace; - mutable sk_sp fXPFactory; + const GrXPFactory* fXPFactory; FragmentProcessorArray fColorFragmentProcessors; FragmentProcessorArray fCoverageFragmentProcessors; -- cgit v1.2.3