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

Side by Side Diff: src/gpu/glsl/GrGLSLXferProcessor.h

Issue 1541903002: added support for PLS path rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix for ASAN failure Created 4 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/glsl/GrGLSLShaderVar.h ('k') | src/utils/debugger/SkOverdrawMode.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 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 #ifndef GrGLSLXferProcessor_DEFINED 8 #ifndef GrGLSLXferProcessor_DEFINED
9 #define GrGLSLXferProcessor_DEFINED 9 #define GrGLSLXferProcessor_DEFINED
10 10
(...skipping 14 matching lines...) Expand all
25 typedef GrGLSLTextureSampler::TextureSamplerArray TextureSamplerArray; 25 typedef GrGLSLTextureSampler::TextureSamplerArray TextureSamplerArray;
26 struct EmitArgs { 26 struct EmitArgs {
27 EmitArgs(GrGLSLXPFragmentBuilder* fragBuilder, 27 EmitArgs(GrGLSLXPFragmentBuilder* fragBuilder,
28 GrGLSLUniformHandler* uniformHandler, 28 GrGLSLUniformHandler* uniformHandler,
29 const GrGLSLCaps* caps, 29 const GrGLSLCaps* caps,
30 const GrXferProcessor& xp, 30 const GrXferProcessor& xp,
31 const char* inputColor, 31 const char* inputColor,
32 const char* inputCoverage, 32 const char* inputCoverage,
33 const char* outputPrimary, 33 const char* outputPrimary,
34 const char* outputSecondary, 34 const char* outputSecondary,
35 const TextureSamplerArray& samplers) 35 const TextureSamplerArray& samplers,
36 const bool usePLSDstRead)
36 : fXPFragBuilder(fragBuilder) 37 : fXPFragBuilder(fragBuilder)
37 , fUniformHandler(uniformHandler) 38 , fUniformHandler(uniformHandler)
38 , fGLSLCaps(caps) 39 , fGLSLCaps(caps)
39 , fXP(xp) 40 , fXP(xp)
40 , fInputColor(inputColor) 41 , fInputColor(inputColor)
41 , fInputCoverage(inputCoverage) 42 , fInputCoverage(inputCoverage)
42 , fOutputPrimary(outputPrimary) 43 , fOutputPrimary(outputPrimary)
43 , fOutputSecondary(outputSecondary) 44 , fOutputSecondary(outputSecondary)
44 , fSamplers(samplers) {} 45 , fSamplers(samplers)
46 , fUsePLSDstRead(usePLSDstRead) {}
45 47
46 GrGLSLXPFragmentBuilder* fXPFragBuilder; 48 GrGLSLXPFragmentBuilder* fXPFragBuilder;
47 GrGLSLUniformHandler* fUniformHandler; 49 GrGLSLUniformHandler* fUniformHandler;
48 const GrGLSLCaps* fGLSLCaps; 50 const GrGLSLCaps* fGLSLCaps;
49 const GrXferProcessor& fXP; 51 const GrXferProcessor& fXP;
50 const char* fInputColor; 52 const char* fInputColor;
51 const char* fInputCoverage; 53 const char* fInputCoverage;
52 const char* fOutputPrimary; 54 const char* fOutputPrimary;
53 const char* fOutputSecondary; 55 const char* fOutputSecondary;
54 const TextureSamplerArray& fSamplers; 56 const TextureSamplerArray& fSamplers;
57 bool fUsePLSDstRead;
55 }; 58 };
56 /** 59 /**
57 * This is similar to emitCode() in the base class, except it takes a full s hader builder. 60 * This is similar to emitCode() in the base class, except it takes a full s hader builder.
58 * This allows the effect subclass to emit vertex code. 61 * This allows the effect subclass to emit vertex code.
59 */ 62 */
60 void emitCode(const EmitArgs&); 63 void emitCode(const EmitArgs&);
61 64
62 /** A GrGLSLXferProcessor instance can be reused with any GrGLSLXferProcesso r that produces 65 /** A GrGLSLXferProcessor instance can be reused with any GrGLSLXferProcesso r that produces
63 the same stage key; this function reads data from a GrGLSLXferProcessor and uploads any 66 the same stage key; this function reads data from a GrGLSLXferProcessor and uploads any
64 uniform variables required by the shaders created in emitCode(). The Gr XferProcessor 67 uniform variables required by the shaders created in emitCode(). The Gr XferProcessor
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 const GrXferProcessor&) { 104 const GrXferProcessor&) {
102 SkFAIL("emitBlendCodeForDstRead not implemented."); 105 SkFAIL("emitBlendCodeForDstRead not implemented.");
103 } 106 }
104 107
105 virtual void onSetData(const GrGLSLProgramDataManager&, const GrXferProcesso r&) = 0; 108 virtual void onSetData(const GrGLSLProgramDataManager&, const GrXferProcesso r&) = 0;
106 109
107 GrGLSLProgramDataManager::UniformHandle fDstTopLeftUni; 110 GrGLSLProgramDataManager::UniformHandle fDstTopLeftUni;
108 GrGLSLProgramDataManager::UniformHandle fDstScaleUni; 111 GrGLSLProgramDataManager::UniformHandle fDstScaleUni;
109 }; 112 };
110 #endif 113 #endif
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLShaderVar.h ('k') | src/utils/debugger/SkOverdrawMode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698