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

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

Issue 2165283002: Remove DrawFace enum from GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try again Created 4 years, 5 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') | src/gpu/instanced/InstancedRendering.cpp » ('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 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 GrPathRange* GrGLPathRendering::createPathRange(GrPathRange::PathGenerator* path Generator, 113 GrPathRange* GrGLPathRendering::createPathRange(GrPathRange::PathGenerator* path Generator,
114 const GrStyle& style) { 114 const GrStyle& style) {
115 return new GrGLPathRange(this->gpu(), pathGenerator, style); 115 return new GrGLPathRange(this->gpu(), pathGenerator, style);
116 } 116 }
117 117
118 void GrGLPathRendering::onStencilPath(const StencilPathArgs& args, const GrPath* path) { 118 void GrGLPathRendering::onStencilPath(const StencilPathArgs& args, const GrPath* path) {
119 GrGLGpu* gpu = this->gpu(); 119 GrGLGpu* gpu = this->gpu();
120 SkASSERT(gpu->caps()->shaderCaps()->pathRenderingSupport()); 120 SkASSERT(gpu->caps()->shaderCaps()->pathRenderingSupport());
121 gpu->flushColorWrite(false); 121 gpu->flushColorWrite(false);
122 gpu->flushDrawFace(GrPipelineBuilder::kBoth_DrawFace); 122 gpu->flushDrawFace(GrDrawFace::kBoth);
123 123
124 GrGLRenderTarget* rt = static_cast<GrGLRenderTarget*>(args.fRenderTarget); 124 GrGLRenderTarget* rt = static_cast<GrGLRenderTarget*>(args.fRenderTarget);
125 SkISize size = SkISize::Make(rt->width(), rt->height()); 125 SkISize size = SkISize::Make(rt->width(), rt->height());
126 this->setProjectionMatrix(*args.fViewMatrix, size, rt->origin()); 126 this->setProjectionMatrix(*args.fViewMatrix, size, rt->origin());
127 gpu->flushScissor(*args.fScissor, rt->getViewport(), rt->origin()); 127 gpu->flushScissor(*args.fScissor, rt->getViewport(), rt->origin());
128 gpu->flushHWAAState(rt, args.fUseHWAA, true); 128 gpu->flushHWAAState(rt, args.fUseHWAA, true);
129 gpu->flushRenderTarget(rt, nullptr); 129 gpu->flushRenderTarget(rt, nullptr);
130 130
131 const GrGLPath* glPath = static_cast<const GrGLPath*>(path); 131 const GrGLPath* glPath = static_cast<const GrGLPath*>(path);
132 132
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 testMask != fHWPathStencilSettings.front().fTestMask) { 330 testMask != fHWPathStencilSettings.front().fTestMask) {
331 GL_CALL(PathStencilFunc(GrToGLStencilFunc(test), ref, testMask)); 331 GL_CALL(PathStencilFunc(GrToGLStencilFunc(test), ref, testMask));
332 } 332 }
333 fHWPathStencilSettings = stencilSettings; 333 fHWPathStencilSettings = stencilSettings;
334 } 334 }
335 } 335 }
336 336
337 inline GrGLGpu* GrGLPathRendering::gpu() { 337 inline GrGLGpu* GrGLPathRendering::gpu() {
338 return static_cast<GrGLGpu*>(fGpu); 338 return static_cast<GrGLGpu*>(fGpu);
339 } 339 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/instanced/InstancedRendering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698