diff --git a/gn/gpu.gni b/gn/gpu.gni index 11ac1cf5f4..ae05f2cb31 100644 --- a/gn/gpu.gni +++ b/gn/gpu.gni @@ -136,7 +136,6 @@ skia_gpu_sources = [ "$_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 d249d58edb..0000000000 --- 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 aca1925832..4e4861a5c1 100644 --- a/src/gpu/GrPipelineBuilder.h +++ b/src/gpu/GrPipelineBuilder.h @@ -29,7 +29,15 @@ public: * 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 @@ public: /** * 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); + } /// @}