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

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

Issue 1666563003: Add support for GL_EXT_raster_multisample (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove rasterMultisampleSupport Created 4 years, 10 months 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/gl/GrGLGpu.cpp ('k') | no next file » | 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 2014 Google Inc. 2 * Copyright 2014 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 "gl/GrGLPathRendering.h" 8 #include "gl/GrGLPathRendering.h"
9 #include "gl/GrGLUtil.h" 9 #include "gl/GrGLUtil.h"
10 #include "gl/GrGLGpu.h" 10 #include "gl/GrGLGpu.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void GrGLPathRendering::onStencilPath(const StencilPathArgs& args, const GrPath* path) { 99 void GrGLPathRendering::onStencilPath(const StencilPathArgs& args, const GrPath* path) {
100 GrGLGpu* gpu = this->gpu(); 100 GrGLGpu* gpu = this->gpu();
101 SkASSERT(gpu->caps()->shaderCaps()->pathRenderingSupport()); 101 SkASSERT(gpu->caps()->shaderCaps()->pathRenderingSupport());
102 gpu->flushColorWrite(false); 102 gpu->flushColorWrite(false);
103 gpu->flushDrawFace(GrPipelineBuilder::kBoth_DrawFace); 103 gpu->flushDrawFace(GrPipelineBuilder::kBoth_DrawFace);
104 104
105 GrGLRenderTarget* rt = static_cast<GrGLRenderTarget*>(args.fRenderTarget); 105 GrGLRenderTarget* rt = static_cast<GrGLRenderTarget*>(args.fRenderTarget);
106 SkISize size = SkISize::Make(rt->width(), rt->height()); 106 SkISize size = SkISize::Make(rt->width(), rt->height());
107 this->setProjectionMatrix(*args.fViewMatrix, size, rt->origin()); 107 this->setProjectionMatrix(*args.fViewMatrix, size, rt->origin());
108 gpu->flushScissor(*args.fScissor, rt->getViewport(), rt->origin()); 108 gpu->flushScissor(*args.fScissor, rt->getViewport(), rt->origin());
109 gpu->flushHWAAState(rt, args.fUseHWAA); 109 gpu->flushHWAAState(rt, args.fUseHWAA, true);
110 gpu->flushRenderTarget(rt, nullptr); 110 gpu->flushRenderTarget(rt, nullptr);
111 111
112 const GrGLPath* glPath = static_cast<const GrGLPath*>(path); 112 const GrGLPath* glPath = static_cast<const GrGLPath*>(path);
113 113
114 this->flushPathStencilSettings(*args.fStencil); 114 this->flushPathStencilSettings(*args.fStencil);
115 SkASSERT(!fHWPathStencilSettings.isTwoSided()); 115 SkASSERT(!fHWPathStencilSettings.isTwoSided());
116 116
117 GrGLenum fillMode = gr_stencil_op_to_gl_path_rendering_fill_mode( 117 GrGLenum fillMode = gr_stencil_op_to_gl_path_rendering_fill_mode(
118 fHWPathStencilSettings.passOp(GrStencilSettings::kFront_Face)); 118 fHWPathStencilSettings.passOp(GrStencilSettings::kFront_Face));
119 GrGLint writeMask = fHWPathStencilSettings.writeMask(GrStencilSettings::kFro nt_Face); 119 GrGLint writeMask = fHWPathStencilSettings.writeMask(GrStencilSettings::kFro nt_Face);
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 funcMask != fHWPathStencilSettings.funcMask(kFront_Face)) { 305 funcMask != fHWPathStencilSettings.funcMask(kFront_Face)) {
306 GL_CALL(PathStencilFunc(GrToGLStencilFunc(func), funcRef, funcMask)) ; 306 GL_CALL(PathStencilFunc(GrToGLStencilFunc(func), funcRef, funcMask)) ;
307 } 307 }
308 fHWPathStencilSettings = stencilSettings; 308 fHWPathStencilSettings = stencilSettings;
309 } 309 }
310 } 310 }
311 311
312 inline GrGLGpu* GrGLPathRendering::gpu() { 312 inline GrGLGpu* GrGLPathRendering::gpu() {
313 return static_cast<GrGLGpu*>(fGpu); 313 return static_cast<GrGLGpu*>(fGpu);
314 } 314 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698