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

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: rebase 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
« no previous file with comments | « src/gpu/gl/GrGLProcessor.h ('k') | src/gpu/gl/GrGLProgramDesc.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 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(optState.drawType()); 168 this->didSetData(optState.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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 for (int t = 0; t < numTransforms; ++t) { 373 for (int t = 0; t < numTransforms; ++t) {
373 const SkMatrix& transform = get_transform_matrix(proc, t); 374 const SkMatrix& transform = get_transform_matrix(proc, t);
374 GrGLPathRendering::PathTexGenComponents components = 375 GrGLPathRendering::PathTexGenComponents components =
375 GrGLPathRendering::kST_PathTexGenComponents; 376 GrGLPathRendering::kST_PathTexGenComponents;
376 if (proc.isPerspectiveCoordTransform(t)) { 377 if (proc.isPerspectiveCoordTransform(t)) {
377 components = GrGLPathRendering::kSTR_PathTexGenComponents; 378 components = GrGLPathRendering::kSTR_PathTexGenComponents;
378 } 379 }
379 fGpu->glPathRendering()->enablePathTexGen(texCoordIndex++, components, t ransform); 380 fGpu->glPathRendering()->enablePathTexGen(texCoordIndex++, components, t ransform);
380 } 381 }
381 } 382 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProcessor.h ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698