| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkMatrix.h" | 8 #include "SkMatrix.h" |
| 9 #include "SkPoint.h" | 9 #include "SkPoint.h" |
| 10 #include "SkString.h" | 10 #include "SkString.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 CoverageSetup fCoverageSetup; | 86 CoverageSetup fCoverageSetup; |
| 87 uint32_t fNumStages; | 87 uint32_t fNumStages; |
| 88 GrGLuint fVboId; | 88 GrGLuint fVboId; |
| 89 GrGLuint fProgram; | 89 GrGLuint fProgram; |
| 90 GrGLuint fFboTextureId; | 90 GrGLuint fFboTextureId; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 93 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 94 | 94 |
| 95 GrGLuint GLVec4ScalarBench::setupShader(const GrGLContext* ctx) { | 95 GrGLuint GLVec4ScalarBench::setupShader(const GrGLContext* ctx) { |
| 96 const char* version = ctx->caps()->glslCaps()->versionDeclString(); | 96 const char* version = GrGLGetGLSLVersionDecl(*ctx); |
| 97 | 97 |
| 98 // this shader draws fNumStages overlapping circles of increasing opacity (c
overage) and | 98 // this shader draws fNumStages overlapping circles of increasing opacity (c
overage) and |
| 99 // decreasing size, with the center of each subsequent circle closer to the
bottom-right | 99 // decreasing size, with the center of each subsequent circle closer to the
bottom-right |
| 100 // corner of the screen than the previous circle. | 100 // corner of the screen than the previous circle. |
| 101 | 101 |
| 102 // set up vertex shader; this is a trivial vertex shader that passes through
position and color | 102 // set up vertex shader; this is a trivial vertex shader that passes through
position and color |
| 103 GrGLSLShaderVar aPosition("a_position", kVec2f_GrSLType, GrShaderVar::kAttri
bute_TypeModifier); | 103 GrGLSLShaderVar aPosition("a_position", kVec2f_GrSLType, GrShaderVar::kAttri
bute_TypeModifier); |
| 104 GrGLSLShaderVar oPosition("o_position", kVec2f_GrSLType, GrShaderVar::kVaryi
ngOut_TypeModifier); | 104 GrGLSLShaderVar oPosition("o_position", kVec2f_GrSLType, GrShaderVar::kVaryi
ngOut_TypeModifier); |
| 105 GrGLSLShaderVar aColor("a_color", kVec3f_GrSLType, GrShaderVar::kAttribute_T
ypeModifier); | 105 GrGLSLShaderVar aColor("a_color", kVec3f_GrSLType, GrShaderVar::kAttribute_T
ypeModifier); |
| 106 GrGLSLShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kVaryingOut_
TypeModifier); | 106 GrGLSLShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kVaryingOut_
TypeModifier); |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe
tup, 2) ) | 295 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe
tup, 2) ) |
| 296 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu
p, 2) ) | 296 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu
p, 2) ) |
| 297 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe
tup, 4) ) | 297 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe
tup, 4) ) |
| 298 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu
p, 4) ) | 298 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu
p, 4) ) |
| 299 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe
tup, 6) ) | 299 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe
tup, 6) ) |
| 300 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu
p, 6) ) | 300 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu
p, 6) ) |
| 301 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe
tup, 8) ) | 301 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe
tup, 8) ) |
| 302 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu
p, 8) ) | 302 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu
p, 8) ) |
| 303 | 303 |
| 304 #endif | 304 #endif |
| OLD | NEW |