OLD | NEW |
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 "GrProcessor.h" | 9 #include "GrProcessor.h" |
10 #include "GrGLGpu.h" | 10 #include "GrGLGpu.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 } | 118 } |
119 | 119 |
120 for (int i = 0; i < pipeline.numFragmentProcessors(); ++i) { | 120 for (int i = 0; i < pipeline.numFragmentProcessors(); ++i) { |
121 const GrFragmentProcessor& fp = pipeline.getFragmentProcessor(i); | 121 const GrFragmentProcessor& fp = pipeline.getFragmentProcessor(i); |
122 if (!gen_frag_proc_and_meta_keys(primProc, fp, gpu->glCaps(), &b)) { | 122 if (!gen_frag_proc_and_meta_keys(primProc, fp, gpu->glCaps(), &b)) { |
123 glDesc->key().reset(); | 123 glDesc->key().reset(); |
124 return false; | 124 return false; |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
128 const GrXferProcessor& xp = *pipeline.getXferProcessor(); | 128 const GrXferProcessor& xp = pipeline.getXferProcessor(); |
129 xp.getGLSLProcessorKey(*gpu->glCaps().glslCaps(), &b); | 129 xp.getGLSLProcessorKey(*gpu->glCaps().glslCaps(), &b); |
130 //**** use glslCaps here? | 130 //**** use glslCaps here? |
131 if (!gen_meta_key(xp, gpu->glCaps(), 0, &b)) { | 131 if (!gen_meta_key(xp, gpu->glCaps(), 0, &b)) { |
132 glDesc->key().reset(); | 132 glDesc->key().reset(); |
133 return false; | 133 return false; |
134 } | 134 } |
135 | 135 |
136 // --------DO NOT MOVE HEADER ABOVE THIS LINE-------------------------------
------------------- | 136 // --------DO NOT MOVE HEADER ABOVE THIS LINE-------------------------------
------------------- |
137 // Because header is a pointer into the dynamic array, we can't push any new
data into the key | 137 // Because header is a pointer into the dynamic array, we can't push any new
data into the key |
138 // below here. | 138 // below here. |
(...skipping 14 matching lines...) Expand all Loading... |
153 } else { | 153 } else { |
154 header->fIgnoresCoverage = 0; | 154 header->fIgnoresCoverage = 0; |
155 } | 155 } |
156 | 156 |
157 header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters(); | 157 header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters(); |
158 header->fColorEffectCnt = pipeline.numColorFragmentProcessors(); | 158 header->fColorEffectCnt = pipeline.numColorFragmentProcessors(); |
159 header->fCoverageEffectCnt = pipeline.numCoverageFragmentProcessors(); | 159 header->fCoverageEffectCnt = pipeline.numCoverageFragmentProcessors(); |
160 glDesc->finalize(); | 160 glDesc->finalize(); |
161 return true; | 161 return true; |
162 } | 162 } |
OLD | NEW |