aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPipelineBuilder.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-01-09 11:46:10 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-09 17:21:03 +0000
commita16339297859f37df69230e64f05624cef511ad3 (patch)
tree07dbb20733defb86e05bc8cc924b4ced8ca78374 /src/gpu/GrPipelineBuilder.h
parenta7080264d11235d6f469d355b14a7647cba8eb75 (diff)
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 <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrPipelineBuilder.h')
-rw-r--r--src/gpu/GrPipelineBuilder.h14
1 files changed, 4 insertions, 10 deletions
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<GrXPFactory> 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<GrXPFactory> fXPFactory;
+ const GrXPFactory* fXPFactory;
FragmentProcessorArray fColorFragmentProcessors;
FragmentProcessorArray fCoverageFragmentProcessors;