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/GrGLProgram.cpp

Issue 772513002: create and thread batch tracker object (Closed) Base URL: https://skia.googlesource.com/skia.git@2_vertex_attr
Patch Set: one tweak Created 6 years 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "GrGLProgram.h" 8 #include "GrGLProgram.h"
9 9
10 #include "GrAllocator.h" 10 #include "GrAllocator.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 SkASSERT(!fBuiltinUniformHandles.fDstCopyTopLeftUni.isValid()); 151 SkASSERT(!fBuiltinUniformHandles.fDstCopyTopLeftUni.isValid());
152 SkASSERT(!fBuiltinUniformHandles.fDstCopyScaleUni.isValid()); 152 SkASSERT(!fBuiltinUniformHandles.fDstCopyScaleUni.isValid());
153 SkASSERT(!fBuiltinUniformHandles.fDstCopySamplerUni.isValid()); 153 SkASSERT(!fBuiltinUniformHandles.fDstCopySamplerUni.isValid());
154 } 154 }
155 155
156 // we set the textures, and uniforms for installed processors in a generic w ay, but subclasses 156 // we set the textures, and uniforms for installed processors in a generic w ay, but subclasses
157 // of GLProgram determine how to set coord transforms 157 // of GLProgram determine how to set coord transforms
158 if (fGeometryProcessor.get()) { 158 if (fGeometryProcessor.get()) {
159 SkASSERT(optState.hasGeometryProcessor()); 159 SkASSERT(optState.hasGeometryProcessor());
160 const GrGeometryProcessor& gp = *optState.getGeometryProcessor(); 160 const GrGeometryProcessor& gp = *optState.getGeometryProcessor();
161 fGeometryProcessor->fGLProc->setData(fProgramDataManager, gp); 161 const GrBatchTracker& bt = optState.getBatchTracker();
162 fGeometryProcessor->fGLProc->setData(fProgramDataManager, gp, bt);
162 this->bindTextures(fGeometryProcessor, gp); 163 this->bindTextures(fGeometryProcessor, gp);
163 } 164 }
164 this->setFragmentData(optState); 165 this->setFragmentData(optState);
165 166
166 // Some of GrGLProgram subclasses need to update state here 167 // Some of GrGLProgram subclasses need to update state here
167 this->didSetData(drawType); 168 this->didSetData(drawType);
168 } 169 }
169 170
170 void GrGLProgram::setFragmentData(const GrOptDrawState& optState) { 171 void GrGLProgram::setFragmentData(const GrOptDrawState& optState) {
171 int numProcessors = fFragmentProcessors->fProcs.count(); 172 int numProcessors = fFragmentProcessors->fProcs.count();
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 for (int t = 0; t < numTransforms; ++t) { 376 for (int t = 0; t < numTransforms; ++t) {
376 const SkMatrix& transform = get_transform_matrix(proc, t); 377 const SkMatrix& transform = get_transform_matrix(proc, t);
377 GrGLPathRendering::PathTexGenComponents components = 378 GrGLPathRendering::PathTexGenComponents components =
378 GrGLPathRendering::kST_PathTexGenComponents; 379 GrGLPathRendering::kST_PathTexGenComponents;
379 if (proc.isPerspectiveCoordTransform(t)) { 380 if (proc.isPerspectiveCoordTransform(t)) {
380 components = GrGLPathRendering::kSTR_PathTexGenComponents; 381 components = GrGLPathRendering::kSTR_PathTexGenComponents;
381 } 382 }
382 fGpu->glPathRendering()->enablePathTexGen(texCoordIndex++, components, t ransform); 383 fGpu->glPathRendering()->enablePathTexGen(texCoordIndex++, components, t ransform);
383 } 384 }
384 } 385 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698