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 "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 Loading... |
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 Loading... |
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 } |
OLD | NEW |