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

Side by Side Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 1151603005: Revert of Store context options on caps. (Closed) Base URL: https://skia.googlesource.com/skia.git@onecaps
Patch Set: Created 5 years, 7 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/gl/GrGLProgramDataManager.cpp ('k') | tests/GLProgramsTest.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 2014 Google Inc. 2 * Copyright 2014 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 "GrGLProgramBuilder.h" 8 #include "GrGLProgramBuilder.h"
9 9
10 #include "gl/GrGLGeometryProcessor.h" 10 #include "gl/GrGLGeometryProcessor.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 SkSTArray<8, GrGLProcessor::TransformedCoordsArray> outCoords; 200 SkSTArray<8, GrGLProcessor::TransformedCoordsArray> outCoords;
201 for (int i = 0; i < this->pipeline().numFragmentStages(); i++) { 201 for (int i = 0; i < this->pipeline().numFragmentStages(); i++) {
202 const GrFragmentProcessor* processor = this->pipeline().getFragmentStage (i).processor(); 202 const GrFragmentProcessor* processor = this->pipeline().getFragmentStage (i).processor();
203 SkSTArray<2, const GrCoordTransform*, true>& procCoords = fCoordTransfor ms.push_back(); 203 SkSTArray<2, const GrCoordTransform*, true>& procCoords = fCoordTransfor ms.push_back();
204 for (int t = 0; t < processor->numTransforms(); t++) { 204 for (int t = 0; t < processor->numTransforms(); t++) {
205 procCoords.push_back(&processor->coordTransform(t)); 205 procCoords.push_back(&processor->coordTransform(t));
206 } 206 }
207 207
208 totalTextures += processor->numTextures(); 208 totalTextures += processor->numTextures();
209 if (totalTextures >= maxTextureUnits) { 209 if (totalTextures >= maxTextureUnits) {
210 GrCapsDebugf(fGpu->caps(), "Program would use too many texture units \n"); 210 GrContextDebugf(fGpu->getContext(), "Program would use too many text ure units\n");
211 return false; 211 return false;
212 } 212 }
213 } 213 }
214 214
215 this->emitAndInstallProc(primProc, inputColor, inputCoverage); 215 this->emitAndInstallProc(primProc, inputColor, inputCoverage);
216 216
217 fFragmentProcessors.reset(SkNEW(GrGLInstalledFragProcs)); 217 fFragmentProcessors.reset(SkNEW(GrGLInstalledFragProcs));
218 int numProcs = this->pipeline().numFragmentStages(); 218 int numProcs = this->pipeline().numFragmentStages();
219 this->emitAndInstallFragProcs(0, this->pipeline().numColorFragmentStages(), inputColor); 219 this->emitAndInstallFragProcs(0, this->pipeline().numColorFragmentStages(), inputColor);
220 this->emitAndInstallFragProcs(this->pipeline().numColorFragmentStages(), num Procs, 220 this->emitAndInstallFragProcs(this->pipeline().numColorFragmentStages(), num Procs,
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 } 503 }
504 504
505 //////////////////////////////////////////////////////////////////////////////// /////////////////// 505 //////////////////////////////////////////////////////////////////////////////// ///////////////////
506 506
507 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { 507 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() {
508 int numProcs = fProcs.count(); 508 int numProcs = fProcs.count();
509 for (int e = 0; e < numProcs; ++e) { 509 for (int e = 0; e < numProcs; ++e) {
510 SkDELETE(fProcs[e]); 510 SkDELETE(fProcs[e]);
511 } 511 }
512 } 512 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgramDataManager.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698