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

Side by Side Diff: src/gpu/gl/builders/GrGLPathProgramBuilder.cpp

Issue 1333273003: Start trying to collapse path program stuff (Closed) Base URL: https://skia.googlesource.com/skia.git@removebt
Patch Set: windows Created 5 years, 3 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
« no previous file with comments | « src/gpu/gl/GrGLUniformHandle.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('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 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 "GrGLPathProgramBuilder.h" 8 #include "GrGLPathProgramBuilder.h"
9 #include "gl/GrGLGpu.h" 9 #include "gl/GrGLGpu.h"
10 #include "gl/GrGLPathProgram.h" 10 #include "gl/GrGLPathProgram.h"
(...skipping 11 matching lines...) Expand all
22 fSeparableVaryingInfos, fGeometryProcessor, fXfer Processor, 22 fSeparableVaryingInfos, fGeometryProcessor, fXfer Processor,
23 fFragmentProcessors.get(), &fSamplerUniforms); 23 fFragmentProcessors.get(), &fSamplerUniforms);
24 } 24 }
25 25
26 GrGLProgramBuilder::SeparableVaryingHandle GrGLPathProgramBuilder::addSeparableV arying( 26 GrGLProgramBuilder::SeparableVaryingHandle GrGLPathProgramBuilder::addSeparableV arying(
27 const char* name, GrGLVertToFrag* v, GrSLPrecision fsPrecision) { 27 const char* name, GrGLVertToFrag* v, GrSLPrecision fsPrecision) {
28 this->addVarying(name, v, fsPrecision); 28 this->addVarying(name, v, fsPrecision);
29 SeparableVaryingInfo& varyingInfo = fSeparableVaryingInfos.push_back(); 29 SeparableVaryingInfo& varyingInfo = fSeparableVaryingInfos.push_back();
30 varyingInfo.fVariable = this->getFragmentShaderBuilder()->fInputs.back(); 30 varyingInfo.fVariable = this->getFragmentShaderBuilder()->fInputs.back();
31 varyingInfo.fLocation = fSeparableVaryingInfos.count() - 1; 31 varyingInfo.fLocation = fSeparableVaryingInfos.count() - 1;
32 return SeparableVaryingHandle::CreateFromSeparableVaryingIndex(varyingInfo.f Location); 32 return SeparableVaryingHandle(varyingInfo.fLocation);
33 } 33 }
34 34
35 void GrGLPathProgramBuilder::bindProgramResourceLocations(GrGLuint programID) { 35 void GrGLPathProgramBuilder::bindProgramResourceLocations(GrGLuint programID) {
36 this->INHERITED::bindProgramResourceLocations(programID); 36 this->INHERITED::bindProgramResourceLocations(programID);
37 if (!fGpu->glPathRendering()->shouldBindFragmentInputs()) { 37 if (!fGpu->glPathRendering()->shouldBindFragmentInputs()) {
38 return; 38 return;
39 } 39 }
40 int count = fSeparableVaryingInfos.count(); 40 int count = fSeparableVaryingInfos.count();
41 for (int i = 0; i < count; ++i) { 41 for (int i = 0; i < count; ++i) {
42 GL_CALL(BindFragmentInputLocation(programID, 42 GL_CALL(BindFragmentInputLocation(programID,
(...skipping 11 matching lines...) Expand all
54 int count = fSeparableVaryingInfos.count(); 54 int count = fSeparableVaryingInfos.count();
55 for (int i = 0; i < count; ++i) { 55 for (int i = 0; i < count; ++i) {
56 GrGLint location; 56 GrGLint location;
57 GL_CALL_RET(location, 57 GL_CALL_RET(location,
58 GetProgramResourceLocation(programID, 58 GetProgramResourceLocation(programID,
59 GR_GL_FRAGMENT_INPUT, 59 GR_GL_FRAGMENT_INPUT,
60 fSeparableVaryingInfos[i].fVariab le.c_str())); 60 fSeparableVaryingInfos[i].fVariab le.c_str()));
61 fSeparableVaryingInfos[i].fLocation = location; 61 fSeparableVaryingInfos[i].fLocation = location;
62 } 62 }
63 } 63 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLUniformHandle.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698