1 /* 2 * Copyright 2017 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #include "GrStencilPathOp.h" 9 10 #include "GrGpu.h" 11 #include "GrOpFlushState.h" 12 #include "GrRenderTargetPriv.h" 13 14 void GrStencilPathOp::onExecute(GrOpFlushState* state) { 15 GrRenderTarget* rt = state->drawOpArgs().renderTarget(); 16 SkASSERT(rt); 17 18 int numStencilBits = rt->renderTargetPriv().numStencilBits(); 19 GrStencilSettings stencil(GrPathRendering::GetStencilPassSettings(fFillType), 20 fHasStencilClip, numStencilBits); 21 22 GrPathRendering::StencilPathArgs args(fUseHWAA, state->drawOpArgs().fProxy, 23 &fViewMatrix, &fScissor, &stencil); 24 state->gpu()->pathRendering()->stencilPath(args, fPath.get()); 25 } 26 27