From 5d1676c751040f4d9a6259720c15250f0c979874 Mon Sep 17 00:00:00 2001 From: robertphillips Date: Thu, 21 Jul 2016 08:18:05 -0700 Subject: [PATCH] Revert of Remove DrawFace enum from GrPipelineBuilder (patchset #2 id:20001 of https://codereview.chromium.org/2165283002/ ) Reason for revert: No Vulkan bot in CQ :( Original issue's description: > Remove DrawFace enum from GrPipelineBuilder > > This gets GrPipelineBuilder.h out of the headers > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165283002 > > Committed: https://skia.googlesource.com/skia/+/da152ebb032c61bb2561bbb3e9a78037ad174d34 TBR=bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2167193002 --- include/gpu/GrTypesPriv.h | 8 -------- src/gpu/GrDrawContext.cpp | 1 - src/gpu/GrDrawTarget.cpp | 1 - src/gpu/GrPathRenderer.h | 1 - src/gpu/GrPipeline.h | 10 +++------- src/gpu/GrPipelineBuilder.cpp | 2 +- src/gpu/GrPipelineBuilder.h | 16 ++++++++++++---- src/gpu/GrResourceProvider.cpp | 1 - src/gpu/GrSoftwarePathRenderer.cpp | 1 - src/gpu/batches/GrDashLinePathRenderer.cpp | 3 +-- src/gpu/batches/GrDefaultPathRenderer.cpp | 18 +++++++++--------- .../batches/GrStencilAndCoverPathRenderer.cpp | 1 - src/gpu/batches/GrTessellatingPathRenderer.cpp | 1 - src/gpu/gl/GrGLGpu.cpp | 18 +++++++++--------- src/gpu/gl/GrGLGpu.h | 5 +++-- src/gpu/gl/GrGLPathRendering.cpp | 2 +- src/gpu/instanced/InstancedRendering.cpp | 1 - src/gpu/text/GrAtlasTextBlob.cpp | 1 - src/gpu/text/GrBatchFontCache.h | 1 - src/gpu/text/GrStencilAndCoverTextContext.cpp | 1 - src/gpu/vk/GrVkPipeline.cpp | 8 ++++---- src/gpu/vk/GrVkPipelineState.cpp | 4 ++-- tools/gpu/GrTest.cpp | 1 - 23 files changed, 45 insertions(+), 61 deletions(-) diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h index abbfdfca06..5168ac91a1 100644 --- a/include/gpu/GrTypesPriv.h +++ b/include/gpu/GrTypesPriv.h @@ -56,14 +56,6 @@ enum GrShaderFlags { }; GR_MAKE_BITFIELD_OPS(GrShaderFlags); -enum class GrDrawFace { - kInvalid = -1, - - kBoth, - kCCW, - kCW, -}; - /** * Precisions of shader language variables. Not all shading languages support precisions or actually * vary the internal precision based on the qualifiers. These currently only apply to float types ( diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp index 40d976869b..8bbf55b8ec 100644 --- a/src/gpu/GrDrawContext.cpp +++ b/src/gpu/GrDrawContext.cpp @@ -12,7 +12,6 @@ #include "GrDrawingManager.h" #include "GrOvalRenderer.h" #include "GrPathRenderer.h" -#include "GrPipelineBuilder.h" #include "GrRenderTarget.h" #include "GrRenderTargetPriv.h" #include "GrResourceProvider.h" diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp index d03130d18e..601b1b552a 100644 --- a/src/gpu/GrDrawTarget.cpp +++ b/src/gpu/GrDrawTarget.cpp @@ -15,7 +15,6 @@ #include "GrPath.h" #include "GrPipeline.h" #include "GrMemoryPool.h" -#include "GrPipelineBuilder.h" #include "GrRenderTarget.h" #include "GrResourceProvider.h" #include "GrRenderTargetPriv.h" diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h index 6547a41843..73e8e03a32 100644 --- a/src/gpu/GrPathRenderer.h +++ b/src/gpu/GrPathRenderer.h @@ -8,7 +8,6 @@ #ifndef GrPathRenderer_DEFINED #define GrPathRenderer_DEFINED -#include "GrCaps.h" #include "GrDrawContext.h" #include "GrPaint.h" #include "GrResourceProvider.h" diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h index 5ec572d0ae..a17eb098cf 100644 --- a/src/gpu/GrPipeline.h +++ b/src/gpu/GrPipeline.h @@ -13,6 +13,7 @@ #include "GrGpu.h" #include "GrNonAtomicRef.h" #include "GrPendingProgramElement.h" +#include "GrPipelineBuilder.h" #include "GrPrimitiveProcessor.h" #include "GrProcOptInfo.h" #include "GrProgramDesc.h" @@ -21,11 +22,6 @@ #include "SkMatrix.h" #include "SkRefCnt.h" -#include "effects/GrCoverageSetOpXP.h" -#include "effects/GrDisableColorXP.h" -#include "effects/GrPorterDuffXferProcessor.h" -#include "effects/GrSimpleTextureEffect.h" - class GrBatch; class GrDrawContext; class GrDeviceCoordTexture; @@ -173,7 +169,7 @@ public: * or both faces. * @return the current draw face(s). */ - GrDrawFace getDrawFace() const { return fDrawFace; } + GrPipelineBuilder::DrawFace getDrawFace() const { return fDrawFace; } /////////////////////////////////////////////////////////////////////////// @@ -216,7 +212,7 @@ private: RenderTarget fRenderTarget; GrScissorState fScissorState; GrStencilSettings fStencilSettings; - GrDrawFace fDrawFace; + GrPipelineBuilder::DrawFace fDrawFace; uint32_t fFlags; ProgramXferProcessor fXferProcessor; FragmentProcessorArray fFragmentProcessors; diff --git a/src/gpu/GrPipelineBuilder.cpp b/src/gpu/GrPipelineBuilder.cpp index 60cbc62cf2..e142de25a3 100644 --- a/src/gpu/GrPipelineBuilder.cpp +++ b/src/gpu/GrPipelineBuilder.cpp @@ -18,7 +18,7 @@ GrPipelineBuilder::GrPipelineBuilder() : fFlags(0x0) , fUserStencilSettings(&GrUserStencilSettings::kUnused) - , fDrawFace(GrDrawFace::kBoth) { + , fDrawFace(kBoth_DrawFace) { SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) } diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h index dca7f36034..06c843fe53 100644 --- a/src/gpu/GrPipelineBuilder.h +++ b/src/gpu/GrPipelineBuilder.h @@ -266,19 +266,27 @@ public: /// @name Face Culling //// + enum DrawFace { + kInvalid_DrawFace = -1, + + kBoth_DrawFace, + kCCW_DrawFace, + kCW_DrawFace, + }; + /** * Gets whether the target is drawing clockwise, counterclockwise, * or both faces. * @return the current draw face(s). */ - GrDrawFace getDrawFace() const { return fDrawFace; } + DrawFace getDrawFace() const { return fDrawFace; } /** * Controls whether clockwise, counterclockwise, or both faces are drawn. * @param face the face(s) to draw. */ - void setDrawFace(GrDrawFace face) { - SkASSERT(GrDrawFace::kInvalid != face); + void setDrawFace(DrawFace face) { + SkASSERT(kInvalid_DrawFace != face); fDrawFace = face; } @@ -297,7 +305,7 @@ private: uint32_t fFlags; const GrUserStencilSettings* fUserStencilSettings; - GrDrawFace fDrawFace; + DrawFace fDrawFace; mutable sk_sp fXPFactory; FragmentProcessorArray fColorFragmentProcessors; FragmentProcessorArray fCoverageFragmentProcessors; diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp index b63a7eaa45..5d3f4b85c2 100644 --- a/src/gpu/GrResourceProvider.cpp +++ b/src/gpu/GrResourceProvider.cpp @@ -8,7 +8,6 @@ #include "GrResourceProvider.h" #include "GrBuffer.h" -#include "GrCaps.h" #include "GrGpu.h" #include "GrPathRendering.h" #include "GrRenderTarget.h" diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp index b6750d4cec..54d4851b1c 100644 --- a/src/gpu/GrSoftwarePathRenderer.cpp +++ b/src/gpu/GrSoftwarePathRenderer.cpp @@ -8,7 +8,6 @@ #include "GrSoftwarePathRenderer.h" #include "GrAuditTrail.h" #include "GrClip.h" -#include "GrPipelineBuilder.h" #include "GrSWMaskHelper.h" #include "GrTextureProvider.h" #include "batches/GrRectBatchFactory.h" diff --git a/src/gpu/batches/GrDashLinePathRenderer.cpp b/src/gpu/batches/GrDashLinePathRenderer.cpp index f2b75be108..d040e84695 100644 --- a/src/gpu/batches/GrDashLinePathRenderer.cpp +++ b/src/gpu/batches/GrDashLinePathRenderer.cpp @@ -7,9 +7,8 @@ #include "GrDashLinePathRenderer.h" -#include "GrAuditTrail.h" #include "GrGpu.h" -#include "GrPipelineBuilder.h" +#include "GrAuditTrail.h" #include "effects/GrDashingEffect.h" bool GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp index 939c025dcc..dc40b7c611 100644 --- a/src/gpu/batches/GrDefaultPathRenderer.cpp +++ b/src/gpu/batches/GrDefaultPathRenderer.cpp @@ -433,7 +433,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext, int passCount = 0; const GrUserStencilSettings* passes[3]; - GrDrawFace drawFace[3]; + GrPipelineBuilder::DrawFace drawFace[3]; bool reverse = false; bool lastPassIsBounds; @@ -445,7 +445,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext, passes[0] = userStencilSettings; } lastPassIsBounds = false; - drawFace[0] = GrDrawFace::kBoth; + drawFace[0] = GrPipelineBuilder::kBoth_DrawFace; } else { if (single_pass_shape(shape)) { passCount = 1; @@ -454,7 +454,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext, } else { passes[0] = userStencilSettings; } - drawFace[0] = GrDrawFace::kBoth; + drawFace[0] = GrPipelineBuilder::kBoth_DrawFace; lastPassIsBounds = false; } else { switch (path.getFillType()) { @@ -475,7 +475,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext, passes[1] = &gEOColorPass; } } - drawFace[0] = drawFace[1] = GrDrawFace::kBoth; + drawFace[0] = drawFace[1] = GrPipelineBuilder::kBoth_DrawFace; break; case SkPath::kInverseWinding_FillType: @@ -489,7 +489,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext, passes[0] = &gWindStencilSeparateNoWrap; } passCount = 2; - drawFace[0] = GrDrawFace::kBoth; + drawFace[0] = GrPipelineBuilder::kBoth_DrawFace; } else { if (fStencilWrapOps) { passes[0] = &gWindSingleStencilWithWrapInc; @@ -499,8 +499,8 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext, passes[1] = &gWindSingleStencilNoWrapDec; } // which is cw and which is ccw is arbitrary. - drawFace[0] = GrDrawFace::kCW; - drawFace[1] = GrDrawFace::kCCW; + drawFace[0] = GrPipelineBuilder::kCW_DrawFace; + drawFace[1] = GrPipelineBuilder::kCCW_DrawFace; passCount = 3; } if (stencilOnly) { @@ -508,7 +508,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext, --passCount; } else { lastPassIsBounds = true; - drawFace[passCount-1] = GrDrawFace::kBoth; + drawFace[passCount-1] = GrPipelineBuilder::kBoth_DrawFace; if (reverse) { passes[passCount-1] = &gInvWindColorPass; } else { @@ -554,7 +554,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext, GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewM, bounds, nullptr, &localMatrix)); - SkASSERT(GrDrawFace::kBoth == drawFace[p]); + SkASSERT(GrPipelineBuilder::kBoth_DrawFace == drawFace[p]); GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(paint)); pipelineBuilder.setDrawFace(drawFace[p]); pipelineBuilder.setUserStencil(passes[p]); diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp index 02d74fff6e..01193ad0aa 100644 --- a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp +++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp @@ -13,7 +13,6 @@ #include "GrDrawPathBatch.h" #include "GrGpu.h" #include "GrPath.h" -#include "GrPipelineBuilder.h" #include "GrRenderTarget.h" #include "GrResourceProvider.h" #include "GrStencilPathBatch.h" diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp index 6dce9f73c8..b022e40330 100644 --- a/src/gpu/batches/GrTessellatingPathRenderer.cpp +++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp @@ -14,7 +14,6 @@ #include "GrDefaultGeoProcFactory.h" #include "GrMesh.h" #include "GrPathUtils.h" -#include "GrPipelineBuilder.h" #include "GrResourceCache.h" #include "GrResourceProvider.h" #include "GrTessellator.h" diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index d309dc1b93..1c07291de0 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -494,7 +494,7 @@ void GrGLGpu::onResetContext(uint32_t resetBits) { fHWBufferState[kXferCpuToGpu_GrBufferType].invalidate(); fHWBufferState[kXferGpuToCpu_GrBufferType].invalidate(); - fHWDrawFace = GrDrawFace::kInvalid; + fHWDrawFace = GrPipelineBuilder::kInvalid_DrawFace; if (kGL_GrGLStandard == this->glStandard()) { // Desktop-only state that we never change @@ -2793,7 +2793,7 @@ void GrGLGpu::stampPLSSetupRect(const SkRect& bounds) { blendInfo.reset(); this->flushBlend(blendInfo, GrSwizzle()); this->flushColorWrite(true); - this->flushDrawFace(GrDrawFace::kBoth); + this->flushDrawFace(GrPipelineBuilder::kBoth_DrawFace); if (!fHWStencilSettings.isDisabled()) { GL_CALL(Disable(GR_GL_STENCIL_TEST)); } @@ -3359,18 +3359,18 @@ void GrGLGpu::flushColorWrite(bool writeColor) { } } -void GrGLGpu::flushDrawFace(GrDrawFace face) { +void GrGLGpu::flushDrawFace(GrPipelineBuilder::DrawFace face) { if (fHWDrawFace != face) { switch (face) { - case GrDrawFace::kCCW: + case GrPipelineBuilder::kCCW_DrawFace: GL_CALL(Enable(GR_GL_CULL_FACE)); GL_CALL(CullFace(GR_GL_BACK)); break; - case GrDrawFace::kCW: + case GrPipelineBuilder::kCW_DrawFace: GL_CALL(Enable(GR_GL_CULL_FACE)); GL_CALL(CullFace(GR_GL_FRONT)); break; - case GrDrawFace::kBoth: + case GrPipelineBuilder::kBoth_DrawFace: GL_CALL(Disable(GR_GL_CULL_FACE)); break; default: @@ -4088,7 +4088,7 @@ void GrGLGpu::drawDebugWireRect(GrRenderTarget* rt, const SkIRect& rect, GrColor blendInfo.reset(); this->flushBlend(blendInfo, GrSwizzle::RGBA()); this->flushColorWrite(true); - this->flushDrawFace(GrDrawFace::kBoth); + this->flushDrawFace(GrPipelineBuilder::kBoth_DrawFace); this->flushHWAAState(glRT, false, false); this->disableScissor(); GrStencilSettings stencil; @@ -4176,7 +4176,7 @@ bool GrGLGpu::copySurfaceAsDraw(GrSurface* dst, blendInfo.reset(); this->flushBlend(blendInfo, GrSwizzle::RGBA()); this->flushColorWrite(true); - this->flushDrawFace(GrDrawFace::kBoth); + this->flushDrawFace(GrPipelineBuilder::kBoth_DrawFace); this->flushHWAAState(nullptr, false, false); this->disableScissor(); GrStencilSettings stencil; @@ -4384,7 +4384,7 @@ bool GrGLGpu::generateMipmap(GrGLTexture* texture, bool gammaCorrect) { blendInfo.reset(); this->flushBlend(blendInfo, GrSwizzle::RGBA()); this->flushColorWrite(true); - this->flushDrawFace(GrDrawFace::kBoth); + this->flushDrawFace(GrPipelineBuilder::kBoth_DrawFace); this->flushHWAAState(nullptr, false, false); this->disableScissor(); GrStencilSettings stencil; diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h index df88565100..02a9c1d54b 100644 --- a/src/gpu/gl/GrGLGpu.h +++ b/src/gpu/gl/GrGLGpu.h @@ -17,6 +17,7 @@ #include "GrGLTexture.h" #include "GrGLVertexArray.h" #include "GrGpu.h" +#include "GrPipelineBuilder.h" #include "GrTypes.h" #include "GrXferProcessor.h" #include "SkTArray.h" @@ -302,7 +303,7 @@ private: }; void flushColorWrite(bool writeColor); - void flushDrawFace(GrDrawFace face); + void flushDrawFace(GrPipelineBuilder::DrawFace face); // flushes the scissor. see the note on flushBoundTextureAndParams about // flushing the scissor after that function is called. @@ -515,7 +516,7 @@ private: TriState fHWStencilTestEnabled; - GrDrawFace fHWDrawFace; + GrPipelineBuilder::DrawFace fHWDrawFace; TriState fHWWriteToColor; uint32_t fHWBoundRenderTargetUniqueID; TriState fHWSRGBFramebuffer; diff --git a/src/gpu/gl/GrGLPathRendering.cpp b/src/gpu/gl/GrGLPathRendering.cpp index 8508cfb99d..35b5e9a053 100644 --- a/src/gpu/gl/GrGLPathRendering.cpp +++ b/src/gpu/gl/GrGLPathRendering.cpp @@ -119,7 +119,7 @@ void GrGLPathRendering::onStencilPath(const StencilPathArgs& args, const GrPath* GrGLGpu* gpu = this->gpu(); SkASSERT(gpu->caps()->shaderCaps()->pathRenderingSupport()); gpu->flushColorWrite(false); - gpu->flushDrawFace(GrDrawFace::kBoth); + gpu->flushDrawFace(GrPipelineBuilder::kBoth_DrawFace); GrGLRenderTarget* rt = static_cast(args.fRenderTarget); SkISize size = SkISize::Make(rt->width(), rt->height()); diff --git a/src/gpu/instanced/InstancedRendering.cpp b/src/gpu/instanced/InstancedRendering.cpp index d763b73064..af89b6cf6e 100644 --- a/src/gpu/instanced/InstancedRendering.cpp +++ b/src/gpu/instanced/InstancedRendering.cpp @@ -8,7 +8,6 @@ #include "InstancedRendering.h" #include "GrBatchFlushState.h" -#include "GrCaps.h" #include "GrPipeline.h" #include "GrResourceProvider.h" #include "instanced/InstanceProcessor.h" diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp index 12f35a38c8..9ab9c1230d 100644 --- a/src/gpu/text/GrAtlasTextBlob.cpp +++ b/src/gpu/text/GrAtlasTextBlob.cpp @@ -10,7 +10,6 @@ #include "GrBlurUtils.h" #include "GrContext.h" #include "GrDrawContext.h" -#include "GrPipelineBuilder.h" #include "GrTextUtils.h" #include "SkColorFilter.h" #include "SkDrawFilter.h" diff --git a/src/gpu/text/GrBatchFontCache.h b/src/gpu/text/GrBatchFontCache.h index 9e08c5303f..2aa67ddebe 100644 --- a/src/gpu/text/GrBatchFontCache.h +++ b/src/gpu/text/GrBatchFontCache.h @@ -9,7 +9,6 @@ #define GrBatchFontCache_DEFINED #include "GrBatchAtlas.h" -#include "GrCaps.h" #include "GrGlyph.h" #include "SkGlyphCache.h" #include "SkTDynamicHash.h" diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp index 1e2347741f..381aa30282 100644 --- a/src/gpu/text/GrStencilAndCoverTextContext.cpp +++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp @@ -11,7 +11,6 @@ #include "GrDrawContext.h" #include "GrPath.h" #include "GrPathRange.h" -#include "GrPipelineBuilder.h" #include "GrResourceProvider.h" #include "GrTextUtils.h" #include "SkAutoKern.h" diff --git a/src/gpu/vk/GrVkPipeline.cpp b/src/gpu/vk/GrVkPipeline.cpp index 733b9c41d5..0ba111af09 100644 --- a/src/gpu/vk/GrVkPipeline.cpp +++ b/src/gpu/vk/GrVkPipeline.cpp @@ -356,16 +356,16 @@ void setup_color_blend_state(const GrVkGpu* gpu, // colorBlendInfo->blendConstants is set dynamically } -VkCullModeFlags draw_face_to_vk_cull_mode(GrDrawFace drawFace) { +VkCullModeFlags draw_face_to_vk_cull_mode(GrPipelineBuilder::DrawFace drawFace) { // Assumes that we've set the front face to be ccw static const VkCullModeFlags gTable[] = { VK_CULL_MODE_NONE, // kBoth_DrawFace VK_CULL_MODE_BACK_BIT, // kCCW_DrawFace, cull back face VK_CULL_MODE_FRONT_BIT, // kCW_DrawFace, cull front face }; - GR_STATIC_ASSERT(0 == GrDrawFace::kBoth); - GR_STATIC_ASSERT(1 == GrDrawFace::kCCW); - GR_STATIC_ASSERT(2 == GrDrawFace::kCW); + GR_STATIC_ASSERT(0 == GrPipelineBuilder::kBoth_DrawFace); + GR_STATIC_ASSERT(1 == GrPipelineBuilder::kCCW_DrawFace); + GR_STATIC_ASSERT(2 == GrPipelineBuilder::kCW_DrawFace); SkASSERT((unsigned)drawFace <= 2); return gTable[drawFace]; diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp index cb3751191c..94d6305bc9 100644 --- a/src/gpu/vk/GrVkPipelineState.cpp +++ b/src/gpu/vk/GrVkPipelineState.cpp @@ -487,8 +487,8 @@ void GrVkPipelineState::BuildStateKey(const GrPipeline& pipeline, GrPrimitiveTyp pipeline.getStencil().genKey(&b); - SkASSERT(sizeof(GrDrawFace) <= sizeof(uint32_t)); - b.add32((int32_t)pipeline.getDrawFace()); + SkASSERT(sizeof(GrPipelineBuilder::DrawFace) <= sizeof(uint32_t)); + b.add32(pipeline.getDrawFace()); b.add32(get_blend_info_key(pipeline)); diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp index 21761c214f..c96cb37e57 100644 --- a/tools/gpu/GrTest.cpp +++ b/tools/gpu/GrTest.cpp @@ -12,7 +12,6 @@ #include "GrDrawContextPriv.h" #include "GrDrawingManager.h" #include "GrGpuResourceCacheAccess.h" -#include "GrPipelineBuilder.h" #include "GrResourceCache.h" #include "SkGpuDevice.h"