Remove GrPipelineBuilder.cpp
Change-Id: I14c26f2967e4722fa4d6ce4664a5857add0cf854
Reviewed-on: https://skia-review.googlesource.com/8822
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/gn/gpu.gni b/gn/gpu.gni
index 11ac1cf..ae05f2c 100644
--- a/gn/gpu.gni
+++ b/gn/gpu.gni
@@ -136,7 +136,6 @@
"$_src/gpu/GrPendingProgramElement.h",
"$_src/gpu/GrPipeline.cpp",
"$_src/gpu/GrPipeline.h",
- "$_src/gpu/GrPipelineBuilder.cpp",
"$_src/gpu/GrPipelineBuilder.h",
"$_src/gpu/GrPipelineInput.h",
"$_src/gpu/GrPrimitiveProcessor.cpp",
diff --git a/src/gpu/GrPipelineBuilder.cpp b/src/gpu/GrPipelineBuilder.cpp
deleted file mode 100644
index d249d58..0000000
--- a/src/gpu/GrPipelineBuilder.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "GrPipelineBuilder.h"
-
-#include "GrBlend.h"
-#include "GrPaint.h"
-#include "GrPipeline.h"
-#include "GrProcOptInfo.h"
-#include "GrXferProcessor.h"
-#include "effects/GrPorterDuffXferProcessor.h"
-#include "ops/GrOp.h"
-
-GrPipelineBuilder::GrPipelineBuilder(GrPaint&& paint, GrAAType aaType)
- : fFlags(0x0)
- , fDrawFace(GrDrawFace::kBoth)
- , fUserStencilSettings(&GrUserStencilSettings::kUnused)
- , fProcessors(std::move(paint)) {
- if (GrAATypeIsHW(aaType)) {
- fFlags |= GrPipeline::kHWAntialias_Flag;
- }
-}
-
-bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps,
- const GrPipelineAnalysis& analysis) const {
- if (fProcessors.xpFactory()) {
- return fProcessors.xpFactory()->willNeedDstTexture(caps, analysis);
- }
- return GrPorterDuffXPFactory::SrcOverWillNeedDstTexture(caps, analysis);
-}
diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h
index aca1925..4e4861a 100644
--- a/src/gpu/GrPipelineBuilder.h
+++ b/src/gpu/GrPipelineBuilder.h
@@ -29,7 +29,15 @@
* no GrPaint equivalents are set to default values with the exception of vertex attribute state
* which is unmodified by this function and clipping which will be enabled.
*/
- GrPipelineBuilder(GrPaint&&, GrAAType);
+ GrPipelineBuilder(GrPaint&& paint, GrAAType aaType)
+ : fFlags(0x0)
+ , fDrawFace(GrDrawFace::kBoth)
+ , fUserStencilSettings(&GrUserStencilSettings::kUnused)
+ , fProcessors(std::move(paint)) {
+ if (GrAATypeIsHW(aaType)) {
+ fFlags |= GrPipeline::kHWAntialias_Flag;
+ }
+ }
///////////////////////////////////////////////////////////////////////////
/// @name Fragment Processors
@@ -67,7 +75,12 @@
/**
* Checks whether the xp will need destination in a texture to correctly blend.
*/
- bool willXPNeedDstTexture(const GrCaps& caps, const GrPipelineAnalysis&) const;
+ bool willXPNeedDstTexture(const GrCaps& caps, const GrPipelineAnalysis& analysis) const {
+ if (fProcessors.xpFactory()) {
+ return fProcessors.xpFactory()->willNeedDstTexture(caps, analysis);
+ }
+ return GrPorterDuffXPFactory::SrcOverWillNeedDstTexture(caps, analysis);
+ }
/// @}