本文整理汇总了C++中GrGLGpu::flushRenderTarget方法的典型用法代码示例。如果您正苦于以下问题:C++ GrGLGpu::flushRenderTarget方法的具体用法?C++ GrGLGpu::flushRenderTarget怎么用?C++ GrGLGpu::flushRenderTarget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GrGLGpu
的用法示例。
在下文中一共展示了GrGLGpu::flushRenderTarget方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onStencilPath
void GrGLPathRendering::onStencilPath(const StencilPathArgs& args, const GrPath* path) {
GrGLGpu* gpu = this->gpu();
SkASSERT(gpu->caps()->shaderCaps()->pathRenderingSupport());
gpu->flushColorWrite(false);
gpu->flushDrawFace(GrPipelineBuilder::kBoth_DrawFace);
GrGLRenderTarget* rt = static_cast<GrGLRenderTarget*>(args.fRenderTarget);
SkISize size = SkISize::Make(rt->width(), rt->height());
this->setProjectionMatrix(*args.fViewMatrix, size, rt->origin());
gpu->flushScissor(*args.fScissor, rt->getViewport(), rt->origin());
gpu->flushHWAAState(rt, args.fUseHWAA);
gpu->flushRenderTarget(rt, NULL);
const GrGLPath* glPath = static_cast<const GrGLPath*>(path);
this->flushPathStencilSettings(*args.fStencil);
SkASSERT(!fHWPathStencilSettings.isTwoSided());
GrGLenum fillMode = gr_stencil_op_to_gl_path_rendering_fill_mode(
fHWPathStencilSettings.passOp(GrStencilSettings::kFront_Face));
GrGLint writeMask = fHWPathStencilSettings.writeMask(GrStencilSettings::kFront_Face);
if (glPath->shouldFill()) {
GL_CALL(StencilFillPath(glPath->pathID(), fillMode, writeMask));
}
if (glPath->shouldStroke()) {
GL_CALL(StencilStrokePath(glPath->pathID(), 0xffff, writeMask));
}
}