/* * Copyright 2018 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/gpu/ops/GrClearStencilClipOp.h" #include "include/private/GrRecordingContext.h" #include "src/gpu/GrGpuCommandBuffer.h" #include "src/gpu/GrMemoryPool.h" #include "src/gpu/GrOpFlushState.h" #include "src/gpu/GrRecordingContextPriv.h" std::unique_ptr GrClearStencilClipOp::Make(GrRecordingContext* context, const GrFixedClip& clip, bool insideStencilMask, GrRenderTargetProxy* proxy) { GrOpMemoryPool* pool = context->priv().opMemoryPool(); return pool->allocate(clip, insideStencilMask, proxy); } void GrClearStencilClipOp::onExecute(GrOpFlushState* state, const SkRect& chainBounds) { SkASSERT(state->rtCommandBuffer()); state->rtCommandBuffer()->clearStencilClip(fClip, fInsideStencilMask); }