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

Side by Side Diff: src/gpu/effects/GrDisableColorXP.cpp

Issue 1110033004: Make XPFragmentBuilder only Builder with access to DstCopy. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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/effects/GrDashingEffect.cpp ('k') | src/gpu/effects/GrDistanceFieldGeoProc.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 "effects/GrDisableColorXP.h" 8 #include "effects/GrDisableColorXP.h"
9 #include "GrProcessor.h" 9 #include "GrProcessor.h"
10 #include "gl/GrGLXferProcessor.h" 10 #include "gl/GrGLXferProcessor.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 ~GLDisableColorXP() override {} 60 ~GLDisableColorXP() override {}
61 61
62 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuil der*) {} 62 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuil der*) {}
63 63
64 private: 64 private:
65 void onEmitCode(const EmitArgs& args) override { 65 void onEmitCode(const EmitArgs& args) override {
66 // This emit code should be empty. However, on the nexus 6 there is a dr iver bug where if 66 // This emit code should be empty. However, on the nexus 6 there is a dr iver bug where if
67 // you do not give gl_FragColor a value, the gl context is lost and we e nd up drawing 67 // you do not give gl_FragColor a value, the gl context is lost and we e nd up drawing
68 // nothing. So this fix just sets the gl_FragColor arbitrarily to 0. 68 // nothing. So this fix just sets the gl_FragColor arbitrarily to 0.
69 GrGLFPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); 69 GrGLXPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder();
70 fsBuilder->codeAppendf("%s = vec4(0);", args.fOutputPrimary); 70 fsBuilder->codeAppendf("%s = vec4(0);", args.fOutputPrimary);
71 } 71 }
72 72
73 void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) overri de {} 73 void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) overri de {}
74 74
75 typedef GrGLXferProcessor INHERITED; 75 typedef GrGLXferProcessor INHERITED;
76 }; 76 };
77 77
78 /////////////////////////////////////////////////////////////////////////////// 78 ///////////////////////////////////////////////////////////////////////////////
79 79
(...skipping 29 matching lines...) Expand all
109 109
110 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory); 110 GR_DEFINE_XP_FACTORY_TEST(GrDisableColorXPFactory);
111 111
112 GrXPFactory* GrDisableColorXPFactory::TestCreate(SkRandom* random, 112 GrXPFactory* GrDisableColorXPFactory::TestCreate(SkRandom* random,
113 GrContext*, 113 GrContext*,
114 const GrDrawTargetCaps&, 114 const GrDrawTargetCaps&,
115 GrTexture*[]) { 115 GrTexture*[]) {
116 return GrDisableColorXPFactory::Create(); 116 return GrDisableColorXPFactory::Create();
117 } 117 }
118 118
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | src/gpu/effects/GrDistanceFieldGeoProc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698