| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 memset(&fCaps, 0, sizeof(fCaps)); | 66 memset(&fCaps, 0, sizeof(fCaps)); |
| 67 } | 67 } |
| 68 | 68 |
| 69 GrGLPathRendering::~GrGLPathRendering() { | 69 GrGLPathRendering::~GrGLPathRendering() { |
| 70 } | 70 } |
| 71 | 71 |
| 72 void GrGLPathRendering::abandonGpuResources() { | 72 void GrGLPathRendering::abandonGpuResources() { |
| 73 fPathNameAllocator.reset(NULL); | 73 fPathNameAllocator.reset(NULL); |
| 74 } | 74 } |
| 75 | 75 |
| 76 |
| 76 // NV_path_rendering | 77 // NV_path_rendering |
| 77 GrGLuint GrGLPathRendering::genPaths(GrGLsizei range) { | 78 GrGLuint GrGLPathRendering::genPaths(GrGLsizei range) { |
| 78 if (range > 1) { | 79 if (range > 1) { |
| 79 GrGLuint name; | 80 GrGLuint name; |
| 80 GL_CALL_RET(name, GenPaths(range)); | 81 GL_CALL_RET(name, GenPaths(range)); |
| 81 return name; | 82 return name; |
| 82 } | 83 } |
| 83 | 84 |
| 84 if (NULL == fPathNameAllocator.get()) { | 85 if (NULL == fPathNameAllocator.get()) { |
| 85 static const int range = 65536; | 86 static const int range = 65536; |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 mask, coverMode, transformType,
transformValues)); | 272 mask, coverMode, transformType,
transformValues)); |
| 272 } | 273 } |
| 273 | 274 |
| 274 | 275 |
| 275 // NV_path_rendering v1.3 | 276 // NV_path_rendering v1.3 |
| 276 GrGLvoid GrGLPathRenderingV13::programPathFragmentInputGen( | 277 GrGLvoid GrGLPathRenderingV13::programPathFragmentInputGen( |
| 277 GrGLuint program, GrGLint location, GrGLenum genMode, | 278 GrGLuint program, GrGLint location, GrGLenum genMode, |
| 278 GrGLint components, const GrGLfloat *coeffs) { | 279 GrGLint components, const GrGLfloat *coeffs) { |
| 279 GL_CALL(ProgramPathFragmentInputGen(program, location, genMode, components,
coeffs)); | 280 GL_CALL(ProgramPathFragmentInputGen(program, location, genMode, components,
coeffs)); |
| 280 } | 281 } |
| OLD | NEW |