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

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

Issue 1192663002: Implement support for CHROMIUM_path_rendering pseudo extension (Closed) Base URL: https://skia.googlesource.com/skia.git@chromium-pathrendering-prepare-03
Patch Set: rebase Created 5 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/GrGLPathRendering.h ('k') | src/gpu/gl/builders/GrGLPathProgramBuilder.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 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/GrGLNameAllocator.h" 9 #include "gl/GrGLNameAllocator.h"
10 #include "gl/GrGLUtil.h" 10 #include "gl/GrGLUtil.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 /* fallthrough */; 54 /* fallthrough */;
55 case kIncClamp_StencilOp: 55 case kIncClamp_StencilOp:
56 return GR_GL_COUNT_UP; 56 return GR_GL_COUNT_UP;
57 case kInvert_StencilOp: 57 case kInvert_StencilOp:
58 return GR_GL_INVERT; 58 return GR_GL_INVERT;
59 } 59 }
60 } 60 }
61 61
62 GrGLPathRendering::GrGLPathRendering(GrGLGpu* gpu) 62 GrGLPathRendering::GrGLPathRendering(GrGLGpu* gpu)
63 : GrPathRendering(gpu) { 63 : GrPathRendering(gpu) {
64 const GrGLInterface* glInterface = gpu->glInterface();
65 fCaps.bindFragmentInputSupport =
66 NULL != glInterface->fFunctions.fBindFragmentInputLocation;
64 } 67 }
65 68
66 GrGLPathRendering::~GrGLPathRendering() { 69 GrGLPathRendering::~GrGLPathRendering() {
67 } 70 }
68 71
69 void GrGLPathRendering::abandonGpuResources() { 72 void GrGLPathRendering::abandonGpuResources() {
70 fPathNameAllocator.reset(NULL); 73 fPathNameAllocator.reset(NULL);
71 } 74 }
72 75
73 void GrGLPathRendering::resetContext() { 76 void GrGLPathRendering::resetContext() {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 GL_CALL(PathStencilFunc(func, stencilSettings.funcRef(GrStencilSettings: :kFront_Face), 289 GL_CALL(PathStencilFunc(func, stencilSettings.funcRef(GrStencilSettings: :kFront_Face),
287 stencilSettings.funcMask(GrStencilSettings::kFro nt_Face))); 290 stencilSettings.funcMask(GrStencilSettings::kFro nt_Face)));
288 291
289 fHWPathStencilSettings = stencilSettings; 292 fHWPathStencilSettings = stencilSettings;
290 } 293 }
291 } 294 }
292 295
293 inline GrGLGpu* GrGLPathRendering::gpu() { 296 inline GrGLGpu* GrGLPathRendering::gpu() {
294 return static_cast<GrGLGpu*>(fGpu); 297 return static_cast<GrGLGpu*>(fGpu);
295 } 298 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.h ('k') | src/gpu/gl/builders/GrGLPathProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698