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

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

Issue 901663007: Revert of Move DstCopy on gpu into the GrXferProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/builders/GrGLProgramBuilder.h ('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 #include "gl/GrGLProgram.h" 9 #include "gl/GrGLProgram.h"
10 #include "gl/GrGLSLPrettyPrint.h" 10 #include "gl/GrGLSLPrettyPrint.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 const int GrGLProgramBuilder::kVarsPerBlock = 8; 50 const int GrGLProgramBuilder::kVarsPerBlock = 8;
51 51
52 GrGLProgram* GrGLProgramBuilder::CreateProgram(const DrawArgs& args, GrGLGpu* gp u) { 52 GrGLProgram* GrGLProgramBuilder::CreateProgram(const DrawArgs& args, GrGLGpu* gp u) {
53 // create a builder. This will be handed off to effects so they can use it to add 53 // create a builder. This will be handed off to effects so they can use it to add
54 // uniforms, varyings, textures, etc 54 // uniforms, varyings, textures, etc
55 SkAutoTDelete<GrGLProgramBuilder> builder(CreateProgramBuilder(args, gpu)); 55 SkAutoTDelete<GrGLProgramBuilder> builder(CreateProgramBuilder(args, gpu));
56 56
57 GrGLProgramBuilder* pb = builder.get(); 57 GrGLProgramBuilder* pb = builder.get();
58 58
59 // emit code to read the dst copy texture, if necessary
60 if (GrGLFragmentShaderBuilder::kNoDstRead_DstReadKey != pb->header().fDstRea dKey &&
61 !gpu->glCaps().fbFetchSupport()) {
62 pb->fFS.emitCodeToReadDstTexture();
63 }
64
59 // TODO: Once all stages can handle taking a float or vec4 and correctly han dling them we can 65 // TODO: Once all stages can handle taking a float or vec4 and correctly han dling them we can
60 // seed correctly here 66 // seed correctly here
61 GrGLSLExpr4 inputColor; 67 GrGLSLExpr4 inputColor;
62 GrGLSLExpr4 inputCoverage; 68 GrGLSLExpr4 inputCoverage;
63 69
64 pb->emitAndInstallProcs(&inputColor, &inputCoverage); 70 pb->emitAndInstallProcs(&inputColor, &inputCoverage);
65 71
66 return pb->finalize(); 72 return pb->finalize();
67 } 73 }
68 74
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 } 495 }
490 496
491 //////////////////////////////////////////////////////////////////////////////// /////////////////// 497 //////////////////////////////////////////////////////////////////////////////// ///////////////////
492 498
493 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { 499 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() {
494 int numProcs = fProcs.count(); 500 int numProcs = fProcs.count();
495 for (int e = 0; e < numProcs; ++e) { 501 for (int e = 0; e < numProcs; ++e) {
496 SkDELETE(fProcs[e]); 502 SkDELETE(fProcs[e]);
497 } 503 }
498 } 504 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698