| Index: src/gpu/gl/GrGpuGL.cpp
|
| diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
|
| index 2965cd4007c6bfaaab7f424142a35b2e0b6bd4f4..0c134ce35801eb0700f2afab47f4241fb78acd50 100644
|
| --- a/src/gpu/gl/GrGpuGL.cpp
|
| +++ b/src/gpu/gl/GrGpuGL.cpp
|
| @@ -1344,7 +1344,7 @@ void GrGLGpu::flushScissor(const GrClipMaskManager::ScissorState& scissorState,
|
| this->disableScissor();
|
| }
|
|
|
| -bool GrGLGpu::flushGraphicsState(const GrOptDrawState& optState) {
|
| +bool GrGLGpu::flushGLState(const GrOptDrawState& optState) {
|
| // GrGpu::setupClipAndFlushState should have already checked this and bailed if not true.
|
| SkASSERT(optState.getRenderTarget());
|
|
|
| @@ -1834,6 +1834,10 @@ GrGLenum gPrimitiveType2GLMode[] = {
|
| #endif
|
|
|
| void GrGLGpu::onDraw(const GrOptDrawState& ds, const GrDrawTarget::DrawInfo& info) {
|
| + if (!this->flushGLState(ds)) {
|
| + return;
|
| + }
|
| +
|
| size_t indexOffsetInBytes;
|
| this->setupGeometry(ds, info, &indexOffsetInBytes);
|
|
|
| @@ -1867,6 +1871,38 @@ void GrGLGpu::onDraw(const GrOptDrawState& ds, const GrDrawTarget::DrawInfo& inf
|
| #endif
|
| }
|
|
|
| +void GrGLGpu::onStencilPath(const GrOptDrawState& ds,
|
| + const GrPath* path,
|
| + const GrStencilSettings& stencil) {
|
| + if (!this->flushGLState(ds)) {
|
| + return;
|
| + }
|
| + fPathRendering->stencilPath(path, stencil);
|
| +}
|
| +
|
| +void GrGLGpu::onDrawPath(const GrOptDrawState& ds, const GrPath* path,
|
| + const GrStencilSettings& stencil) {
|
| + if (!this->flushGLState(ds)) {
|
| + return;
|
| + }
|
| + fPathRendering->drawPath(path, stencil);
|
| +}
|
| +
|
| +void GrGLGpu::onDrawPaths(const GrOptDrawState& ds,
|
| + const GrPathRange* pathRange,
|
| + const void* indices,
|
| + GrDrawTarget::PathIndexType indexType,
|
| + const float transformValues[],
|
| + GrDrawTarget::PathTransformType transformType,
|
| + int count,
|
| + const GrStencilSettings& stencil) {
|
| + if (!this->flushGLState(ds)) {
|
| + return;
|
| + }
|
| + fPathRendering->drawPaths(pathRange, indices, indexType, transformValues,
|
| + transformType, count, stencil);
|
| +}
|
| +
|
| void GrGLGpu::onResolveRenderTarget(GrRenderTarget* target) {
|
| GrGLRenderTarget* rt = static_cast<GrGLRenderTarget*>(target);
|
| if (rt->needsResolve()) {
|
|
|