diff options
Diffstat (limited to 'src/gpu/ops/GrClearStencilClipOp.cpp')
-rw-r--r-- | src/gpu/ops/GrClearStencilClipOp.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gpu/ops/GrClearStencilClipOp.cpp b/src/gpu/ops/GrClearStencilClipOp.cpp new file mode 100644 index 0000000000..9a0e75a019 --- /dev/null +++ b/src/gpu/ops/GrClearStencilClipOp.cpp @@ -0,0 +1,23 @@ +/* + * 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 "GrClearStencilClipOp.h" + +#include "GrGpuCommandBuffer.h" +#include "GrMemoryPool.h" + +std::unique_ptr<GrOp> GrClearStencilClipOp::Make(GrContext* context, + const GrFixedClip& clip, + bool insideStencilMask, + GrRenderTargetProxy* proxy) { + return std::unique_ptr<GrOp>(new GrClearStencilClipOp(clip, insideStencilMask, proxy)); +} + +void GrClearStencilClipOp::onExecute(GrOpFlushState* state) { + SkASSERT(state->rtCommandBuffer()); + state->rtCommandBuffer()->clearStencilClip(fClip, fInsideStencilMask); +} |