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

Side by Side Diff: src/gpu/glsl/GrGLSLProgramBuilder.cpp

Issue 1806983002: Update how we send draws to gpu backend to reduce state setting. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 4 years, 9 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/glsl/GrGLSLProgramBuilder.h ('k') | src/gpu/vk/GrVkGpu.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "glsl/GrGLSLProgramBuilder.h" 8 #include "glsl/GrGLSLProgramBuilder.h"
9 9
10 #include "GrPipeline.h" 10 #include "GrPipeline.h"
11 #include "glsl/GrGLSLFragmentProcessor.h" 11 #include "glsl/GrGLSLFragmentProcessor.h"
12 #include "glsl/GrGLSLGeometryProcessor.h" 12 #include "glsl/GrGLSLGeometryProcessor.h"
13 #include "glsl/GrGLSLVarying.h" 13 #include "glsl/GrGLSLVarying.h"
14 #include "glsl/GrGLSLXferProcessor.h" 14 #include "glsl/GrGLSLXferProcessor.h"
15 15
16 const int GrGLSLProgramBuilder::kVarsPerBlock = 8; 16 const int GrGLSLProgramBuilder::kVarsPerBlock = 8;
17 17
18 GrGLSLProgramBuilder::GrGLSLProgramBuilder(const DrawArgs& args) 18 GrGLSLProgramBuilder::GrGLSLProgramBuilder(const GrPipeline& pipeline,
19 const GrPrimitiveProcessor& primProc,
20 const GrProgramDesc& desc)
19 : fVS(this) 21 : fVS(this)
20 , fGS(this) 22 , fGS(this)
21 , fFS(this) 23 , fFS(this)
22 , fStageIndex(-1) 24 , fStageIndex(-1)
23 , fArgs(args) 25 , fPipeline(pipeline)
26 , fPrimProc(primProc)
27 , fDesc(desc)
24 , fGeometryProcessor(nullptr) 28 , fGeometryProcessor(nullptr)
25 , fXferProcessor(nullptr) 29 , fXferProcessor(nullptr)
26 , fSamplerUniforms(4) 30 , fSamplerUniforms(4)
27 , fNumVertexSamplers(0) 31 , fNumVertexSamplers(0)
28 , fNumGeometrySamplers(0) 32 , fNumGeometrySamplers(0)
29 , fNumFragmentSamplers(0) { 33 , fNumFragmentSamplers(0) {
30 } 34 }
31 35
32 void GrGLSLProgramBuilder::addFeature(GrShaderFlags shaders, 36 void GrGLSLProgramBuilder::addFeature(GrShaderFlags shaders,
33 uint32_t featureBit, 37 uint32_t featureBit,
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 delete fFragmentProcessors[i]; 363 delete fFragmentProcessors[i];
360 } 364 }
361 } 365 }
362 366
363 void GrGLSLProgramBuilder::finalizeShaders() { 367 void GrGLSLProgramBuilder::finalizeShaders() {
364 this->varyingHandler()->finalize(); 368 this->varyingHandler()->finalize();
365 fVS.finalize(kVertex_GrShaderFlag); 369 fVS.finalize(kVertex_GrShaderFlag);
366 fFS.finalize(kFragment_GrShaderFlag); 370 fFS.finalize(kFragment_GrShaderFlag);
367 371
368 } 372 }
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLProgramBuilder.h ('k') | src/gpu/vk/GrVkGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698