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

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

Issue 13296005: Revise attribute binding interface (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fix fExperimentalGS in GrGLProgramDesc Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLSL.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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/GrGLShaderBuilder.h" 8 #include "gl/GrGLShaderBuilder.h"
9 #include "gl/GrGLProgram.h" 9 #include "gl/GrGLProgram.h"
10 #include "gl/GrGLUniformHandle.h" 10 #include "gl/GrGLUniformHandle.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 #else 110 #else
111 , fUsesGS(false) 111 , fUsesGS(false)
112 #endif 112 #endif
113 , fSetupFragPosition(false) 113 , fSetupFragPosition(false)
114 , fRTHeightUniform(GrGLUniformManager::kInvalidUniformHandle) 114 , fRTHeightUniform(GrGLUniformManager::kInvalidUniformHandle)
115 , fDstCopyTopLeftUniform (GrGLUniformManager::kInvalidUniformHandle) 115 , fDstCopyTopLeftUniform (GrGLUniformManager::kInvalidUniformHandle)
116 , fDstCopyScaleUniform (GrGLUniformManager::kInvalidUniformHandle) { 116 , fDstCopyScaleUniform (GrGLUniformManager::kInvalidUniformHandle) {
117 117
118 fPositionVar = &fVSAttrs.push_back(); 118 fPositionVar = &fVSAttrs.push_back();
119 fPositionVar->set(kVec2f_GrSLType, GrGLShaderVar::kAttribute_TypeModifier, " aPosition"); 119 fPositionVar->set(kVec2f_GrSLType, GrGLShaderVar::kAttribute_TypeModifier, " aPosition");
120 if (desc.fAttribBindings & GrDrawState::kLocalCoords_AttribBindingsBit) { 120 if (-1 != desc.fLocalCoordAttributeIndex) {
121 fLocalCoordsVar = &fVSAttrs.push_back(); 121 fLocalCoordsVar = &fVSAttrs.push_back();
122 fLocalCoordsVar->set(kVec2f_GrSLType, 122 fLocalCoordsVar->set(kVec2f_GrSLType,
123 GrGLShaderVar::kAttribute_TypeModifier, 123 GrGLShaderVar::kAttribute_TypeModifier,
124 "aLocalCoords"); 124 "aLocalCoords");
125 } else { 125 } else {
126 fLocalCoordsVar = fPositionVar; 126 fLocalCoordsVar = fPositionVar;
127 } 127 }
128 if (kNoDstRead_DstReadKey != desc.fDstRead) { 128 if (kNoDstRead_DstReadKey != desc.fDstRead) {
129 bool topDown = SkToBool(kTopLeftOrigin_DstReadKeyBit & desc.fDstRead); 129 bool topDown = SkToBool(kTopLeftOrigin_DstReadKeyBit & desc.fDstRead);
130 const char* dstCopyTopLeftName; 130 const char* dstCopyTopLeftName;
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 for (const AttributePair* attrib = this->getEffectAttributes().begin(); 648 for (const AttributePair* attrib = this->getEffectAttributes().begin();
649 attrib != attribEnd; 649 attrib != attribEnd;
650 ++attrib) { 650 ++attrib) {
651 if (attrib->fIndex == attributeIndex) { 651 if (attrib->fIndex == attributeIndex) {
652 return &attrib->fName; 652 return &attrib->fName;
653 } 653 }
654 } 654 }
655 655
656 return NULL; 656 return NULL;
657 } 657 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLSL.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698