Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Side by Side Diff: src/gpu/gl/GrGLGpu.cpp

Issue 2468653002: Remove GrStencilSettings from GrPipeline (Closed)
Patch Set: Remove GrStencilSettings from GrPipeline Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.h ('k') | src/gpu/gl/GrGLPathRendering.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrGLGpu.h" 8 #include "GrGLGpu.h"
9 #include "GrGLBuffer.h" 9 #include "GrGLBuffer.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 if (blendInfo.fWriteColor) { 2045 if (blendInfo.fWriteColor) {
2046 // Swizzle the blend to match what the shader will output. 2046 // Swizzle the blend to match what the shader will output.
2047 const GrSwizzle& swizzle = this->glCaps().glslCaps()->configOutputSwizzl e( 2047 const GrSwizzle& swizzle = this->glCaps().glslCaps()->configOutputSwizzl e(
2048 pipeline.getRenderTarget()->config()); 2048 pipeline.getRenderTarget()->config());
2049 this->flushBlend(blendInfo, swizzle); 2049 this->flushBlend(blendInfo, swizzle);
2050 } 2050 }
2051 2051
2052 program->setData(primProc, pipeline); 2052 program->setData(primProc, pipeline);
2053 2053
2054 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(pipeline.getRenderTa rget()); 2054 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(pipeline.getRenderTa rget());
2055 this->flushStencil(pipeline.getStencil()); 2055 GrStencilSettings stencil;
2056 if (pipeline.isStencilEnabled()) {
2057 // TODO: attach stencil and create settings during render target flush.
2058 SkASSERT(glRT->renderTargetPriv().getStencilAttachment());
2059 stencil.reset(*pipeline.getUserStencil(), pipeline.hasStencilClip(),
2060 glRT->renderTargetPriv().numStencilBits());
2061 }
2062 this->flushStencil(stencil);
2056 this->flushScissor(pipeline.getScissorState(), glRT->getViewport(), glRT->or igin()); 2063 this->flushScissor(pipeline.getScissorState(), glRT->getViewport(), glRT->or igin());
2057 this->flushWindowRectangles(pipeline.getWindowRectsState(), glRT); 2064 this->flushWindowRectangles(pipeline.getWindowRectsState(), glRT);
2058 this->flushHWAAState(glRT, pipeline.isHWAntialiasState(), !pipeline.getStenc il().isDisabled()); 2065 this->flushHWAAState(glRT, pipeline.isHWAntialiasState(), stencil.isDisabled ());
2059 2066
2060 // This must come after textures are flushed because a texture may need 2067 // This must come after textures are flushed because a texture may need
2061 // to be msaa-resolved (which will modify bound FBO state). 2068 // to be msaa-resolved (which will modify bound FBO state).
2062 this->flushRenderTarget(glRT, nullptr, pipeline.getDisableOutputConversionTo SRGB()); 2069 this->flushRenderTarget(glRT, nullptr, pipeline.getDisableOutputConversionTo SRGB());
2063 2070
2064 return true; 2071 return true;
2065 } 2072 }
2066 2073
2067 void GrGLGpu::setupGeometry(const GrPrimitiveProcessor& primProc, 2074 void GrGLGpu::setupGeometry(const GrPrimitiveProcessor& primProc,
2068 const GrNonInstancedMesh& mesh, 2075 const GrNonInstancedMesh& mesh,
(...skipping 2573 matching lines...) Expand 10 before | Expand all | Expand 10 after
4642 4649
4643 bool GrGLGpu::waitFence(GrFence fence, uint64_t timeout) const { 4650 bool GrGLGpu::waitFence(GrFence fence, uint64_t timeout) const {
4644 GrGLenum result; 4651 GrGLenum result;
4645 GL_CALL_RET(result, ClientWaitSync((GrGLsync)fence, GR_GL_SYNC_FLUSH_COMMAND S_BIT, timeout)); 4652 GL_CALL_RET(result, ClientWaitSync((GrGLsync)fence, GR_GL_SYNC_FLUSH_COMMAND S_BIT, timeout));
4646 return (GR_GL_CONDITION_SATISFIED == result); 4653 return (GR_GL_CONDITION_SATISFIED == result);
4647 } 4654 }
4648 4655
4649 void GrGLGpu::deleteFence(GrFence fence) const { 4656 void GrGLGpu::deleteFence(GrFence fence) const {
4650 GL_CALL(DeleteSync((GrGLsync)fence)); 4657 GL_CALL(DeleteSync((GrGLsync)fence));
4651 } 4658 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.h ('k') | src/gpu/gl/GrGLPathRendering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698