| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
| 9 #include "GrGLGpu.h" | 9 #include "GrGLGpu.h" |
| 10 #include "GrGLGLSL.h" | 10 #include "GrGLGLSL.h" |
| (...skipping 2791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2802 | 2802 |
| 2803 if (can_blit_framebuffer(dst, src, this)) { | 2803 if (can_blit_framebuffer(dst, src, this)) { |
| 2804 return this->copySurfaceAsBlitFramebuffer(dst, src, srcRect, dstPoint); | 2804 return this->copySurfaceAsBlitFramebuffer(dst, src, srcRect, dstPoint); |
| 2805 } | 2805 } |
| 2806 | 2806 |
| 2807 return false; | 2807 return false; |
| 2808 } | 2808 } |
| 2809 | 2809 |
| 2810 | 2810 |
| 2811 void GrGLGpu::createCopyProgram() { | 2811 void GrGLGpu::createCopyProgram() { |
| 2812 const char* version = this->glCaps().glslCaps()->versionDeclString(); | 2812 const char* version = GrGLGetGLSLVersionDecl(this->ctxInfo()); |
| 2813 | 2813 |
| 2814 GrGLSLShaderVar aVertex("a_vertex", kVec2f_GrSLType, GrShaderVar::kAttribute
_TypeModifier); | 2814 GrGLSLShaderVar aVertex("a_vertex", kVec2f_GrSLType, GrShaderVar::kAttribute
_TypeModifier); |
| 2815 GrGLSLShaderVar uTexCoordXform("u_texCoordXform", kVec4f_GrSLType, | 2815 GrGLSLShaderVar uTexCoordXform("u_texCoordXform", kVec4f_GrSLType, |
| 2816 GrShaderVar::kUniform_TypeModifier); | 2816 GrShaderVar::kUniform_TypeModifier); |
| 2817 GrGLSLShaderVar uPosXform("u_posXform", kVec4f_GrSLType, GrShaderVar::kUnifo
rm_TypeModifier); | 2817 GrGLSLShaderVar uPosXform("u_posXform", kVec4f_GrSLType, GrShaderVar::kUnifo
rm_TypeModifier); |
| 2818 GrGLSLShaderVar uTexture("u_texture", kSampler2D_GrSLType, GrShaderVar::kUni
form_TypeModifier); | 2818 GrGLSLShaderVar uTexture("u_texture", kSampler2D_GrSLType, GrShaderVar::kUni
form_TypeModifier); |
| 2819 GrGLSLShaderVar vTexCoord("v_texCoord", kVec2f_GrSLType, GrShaderVar::kVaryi
ngOut_TypeModifier); | 2819 GrGLSLShaderVar vTexCoord("v_texCoord", kVec2f_GrSLType, GrShaderVar::kVaryi
ngOut_TypeModifier); |
| 2820 GrGLSLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut
_TypeModifier); | 2820 GrGLSLShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut
_TypeModifier); |
| 2821 | 2821 |
| 2822 SkString vshaderTxt(version); | 2822 SkString vshaderTxt(version); |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3182 this->setVertexArrayID(gpu, 0); | 3182 this->setVertexArrayID(gpu, 0); |
| 3183 } | 3183 } |
| 3184 int attrCount = gpu->glCaps().maxVertexAttributes(); | 3184 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 3185 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 3185 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 3186 fDefaultVertexArrayAttribState.resize(attrCount); | 3186 fDefaultVertexArrayAttribState.resize(attrCount); |
| 3187 } | 3187 } |
| 3188 attribState = &fDefaultVertexArrayAttribState; | 3188 attribState = &fDefaultVertexArrayAttribState; |
| 3189 } | 3189 } |
| 3190 return attribState; | 3190 return attribState; |
| 3191 } | 3191 } |
| OLD | NEW |