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

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

Issue 1142003003: Revert of Move copy-surface-as-draw fallback to GrGLGpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@vares
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
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 SkASSERT(!fXferProcessor); 336 SkASSERT(!fXferProcessor);
337 fXferProcessor = SkNEW(GrGLInstalledXferProc); 337 fXferProcessor = SkNEW(GrGLInstalledXferProc);
338 338
339 fXferProcessor->fGLProc.reset(xp.createGLInstance()); 339 fXferProcessor->fGLProc.reset(xp.createGLInstance());
340 340
341 // Enable dual source secondary output if we have one 341 // Enable dual source secondary output if we have one
342 if (xp.hasSecondaryOutput()) { 342 if (xp.hasSecondaryOutput()) {
343 fFS.enableSecondaryOutput(); 343 fFS.enableSecondaryOutput();
344 } 344 }
345 345
346 if (this->ctxInfo().caps()->glslCaps()->mustDeclareFragmentShaderOutput()) { 346 // On any post 1.10 GLSL supporting GPU, we declare custom output
347 if (k110_GrGLSLGeneration != fFS.fProgramBuilder->gpu()->glslGeneration()) {
347 fFS.enableCustomOutput(); 348 fFS.enableCustomOutput();
348 } 349 }
349 350
350 SkString openBrace; 351 SkString openBrace;
351 openBrace.printf("{ // Xfer Processor: %s\n", xp.name()); 352 openBrace.printf("{ // Xfer Processor: %s\n", xp.name());
352 fFS.codeAppend(openBrace.c_str()); 353 fFS.codeAppend(openBrace.c_str());
353 354
354 SkSTArray<4, GrGLProcessor::TextureSampler> samplers(xp.numTextures()); 355 SkSTArray<4, GrGLProcessor::TextureSampler> samplers(xp.numTextures());
355 this->emitSamplers(xp, &samplers, fXferProcessor); 356 this->emitSamplers(xp, &samplers, fXferProcessor);
356 357
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 } 503 }
503 504
504 //////////////////////////////////////////////////////////////////////////////// /////////////////// 505 //////////////////////////////////////////////////////////////////////////////// ///////////////////
505 506
506 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { 507 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() {
507 int numProcs = fProcs.count(); 508 int numProcs = fProcs.count();
508 for (int e = 0; e < numProcs; ++e) { 509 for (int e = 0; e < numProcs; ++e) {
509 SkDELETE(fProcs[e]); 510 SkDELETE(fProcs[e]);
510 } 511 }
511 } 512 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp ('k') | src/gpu/gl/builders/GrGLShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698