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

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

Issue 367643004: Implement NVPR on GLES (Closed) Base URL: https://skia.googlesource.com/skia.git@02-path-program-fragment
Patch Set: rebase Created 6 years, 4 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
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/GrGLInterface.h" 9 #include "gl/GrGLInterface.h"
10 #include "gl/GrGLNameAllocator.h" 10 #include "gl/GrGLNameAllocator.h"
(...skipping 19 matching lines...) Expand all
30 virtual GrGLvoid stencilThenCoverStrokePathInstanced( 30 virtual GrGLvoid stencilThenCoverStrokePathInstanced(
31 GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvo id *paths, 31 GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvo id *paths,
32 GrGLuint pathBase, GrGLint reference, GrGLuint mask, Gr GLenum coverMode, 32 GrGLuint pathBase, GrGLint reference, GrGLuint mask, Gr GLenum coverMode,
33 GrGLenum transformType, const GrGLfloat *transformValue s) SK_OVERRIDE; 33 GrGLenum transformType, const GrGLfloat *transformValue s) SK_OVERRIDE;
34 }; 34 };
35 35
36 class GrGLPathRenderingV13 : public GrGLPathRenderingV12 { 36 class GrGLPathRenderingV13 : public GrGLPathRenderingV12 {
37 public: 37 public:
38 GrGLPathRenderingV13(const GrGLInterface* glInterface) 38 GrGLPathRenderingV13(const GrGLInterface* glInterface)
39 : GrGLPathRenderingV12(glInterface) { 39 : GrGLPathRenderingV12(glInterface) {
40 fCaps.fragmentInputGenSupport = true; 40 // Using ProgramPathFragmentInputGen on OpenGL triggers a bug that manif ests itself
41 // sometimes when running shadertext test. Valgrind catches the problem reproducibly.
42 // TODO: remove this once this is fixed in the driver.
43 fCaps.fragmentInputGenSupport = kGLES_GrGLStandard == glInterface->fStan dard;
41 } 44 }
42 45
43 virtual GrGLvoid programPathFragmentInputGen(GrGLuint program, GrGLint locat ion, 46 virtual GrGLvoid programPathFragmentInputGen(GrGLuint program, GrGLint locat ion,
44 GrGLenum genMode, GrGLint compo nents, 47 GrGLenum genMode, GrGLint compo nents,
45 const GrGLfloat *coeffs) SK_OVE RRIDE; 48 const GrGLfloat *coeffs) SK_OVE RRIDE;
46 }; 49 };
47 50
48 51
49 GrGLPathRendering* GrGLPathRendering::Create(const GrGLInterface* glInterface) { 52 GrGLPathRendering* GrGLPathRendering::Create(const GrGLInterface* glInterface) {
50 if (NULL == glInterface->fFunctions.fStencilThenCoverFillPath || 53 if (NULL == glInterface->fFunctions.fStencilThenCoverFillPath ||
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 mask, coverMode, transformType, transformValues)); 275 mask, coverMode, transformType, transformValues));
273 } 276 }
274 277
275 278
276 // NV_path_rendering v1.3 279 // NV_path_rendering v1.3
277 GrGLvoid GrGLPathRenderingV13::programPathFragmentInputGen( 280 GrGLvoid GrGLPathRenderingV13::programPathFragmentInputGen(
278 GrGLuint program, GrGLint location, GrGLenum genMode, 281 GrGLuint program, GrGLint location, GrGLenum genMode,
279 GrGLint components, const GrGLfloat *coeffs) { 282 GrGLint components, const GrGLfloat *coeffs) {
280 GL_CALL(ProgramPathFragmentInputGen(program, location, genMode, components, coeffs)); 283 GL_CALL(ProgramPathFragmentInputGen(program, location, genMode, components, coeffs));
281 } 284 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLProgram.h » ('j') | src/gpu/gl/GrGLProgram.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698