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

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

Issue 1266633003: Added registerChild; transforms, textures, glKey automatically handled. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: refactored to onGetGLProcessorKey; removed emitSamplers specialized template; fixed nits Created 5 years, 4 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/effects/GrYUVtoRGBEffect.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.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 2013 Google Inc. 2 * Copyright 2013 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 #include "GrGLProgramDesc.h" 7 #include "GrGLProgramDesc.h"
8 8
9 #include "GrGLFragmentProcessor.h" 9 #include "GrGLFragmentProcessor.h"
10 #include "GrProcessor.h" 10 #include "GrProcessor.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 primProc.getGLProcessorKey(batchTracker, *gpu->glCaps().glslCaps(), &b); 108 primProc.getGLProcessorKey(batchTracker, *gpu->glCaps().glslCaps(), &b);
109 //**** use glslCaps here? 109 //**** use glslCaps here?
110 if (!get_meta_key(primProc, gpu->glCaps(), 0, &b)) { 110 if (!get_meta_key(primProc, gpu->glCaps(), 0, &b)) {
111 glDesc->key().reset(); 111 glDesc->key().reset();
112 return false; 112 return false;
113 } 113 }
114 114
115 for (int s = 0; s < pipeline.numFragmentStages(); ++s) { 115 for (int s = 0; s < pipeline.numFragmentStages(); ++s) {
116 const GrPendingFragmentStage& fps = pipeline.getFragmentStage(s); 116 const GrPendingFragmentStage& fps = pipeline.getFragmentStage(s);
117 const GrFragmentProcessor& fp = *fps.processor(); 117 const GrFragmentProcessor& fp = *fps.processor();
118
118 fp.getGLProcessorKey(*gpu->glCaps().glslCaps(), &b); 119 fp.getGLProcessorKey(*gpu->glCaps().glslCaps(), &b);
120
119 //**** use glslCaps here? 121 //**** use glslCaps here?
120 if (!get_meta_key(fp, gpu->glCaps(), primProc.getTransformKey(fp.coordTr ansforms()), &b)) { 122 if (!get_meta_key(fp, gpu->glCaps(), primProc.getTransformKey(fp.coordTr ansforms()), &b)) {
121 glDesc->key().reset(); 123 glDesc->key().reset();
122 return false; 124 return false;
123 } 125 }
124 } 126 }
125 127
126 const GrXferProcessor& xp = *pipeline.getXferProcessor(); 128 const GrXferProcessor& xp = *pipeline.getXferProcessor();
127 xp.getGLProcessorKey(*gpu->glCaps().glslCaps(), &b); 129 xp.getGLProcessorKey(*gpu->glCaps().glslCaps(), &b);
128 //**** use glslCaps here? 130 //**** use glslCaps here?
(...skipping 16 matching lines...) Expand all
145 gpu->glCaps()) ; 147 gpu->glCaps()) ;
146 } else { 148 } else {
147 header->fFragPosKey = 0; 149 header->fFragPosKey = 0;
148 } 150 }
149 header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters(); 151 header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters();
150 header->fColorEffectCnt = pipeline.numColorFragmentStages(); 152 header->fColorEffectCnt = pipeline.numColorFragmentStages();
151 header->fCoverageEffectCnt = pipeline.numCoverageFragmentStages(); 153 header->fCoverageEffectCnt = pipeline.numCoverageFragmentStages();
152 glDesc->finalize(); 154 glDesc->finalize();
153 return true; 155 return true;
154 } 156 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrYUVtoRGBEffect.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698