OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |