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

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

Issue 1684063006: Add GrShaderFlags enum (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Bit->Flag 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/GrGLSLPrimitiveProcessor.cpp ('k') | src/gpu/glsl/GrGLSLProgramBuilder.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 GrGLSLProgramBuilder_DEFINED 8 #ifndef GrGLSLProgramBuilder_DEFINED
9 #define GrGLSLProgramBuilder_DEFINED 9 #define GrGLSLProgramBuilder_DEFINED
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 class GrGLSLCaps; 22 class GrGLSLCaps;
23 class GrGLSLShaderVar; 23 class GrGLSLShaderVar;
24 class GrGLSLVaryingHandler; 24 class GrGLSLVaryingHandler;
25 25
26 typedef SkSTArray<8, GrGLSLFragmentProcessor*, true> GrGLSLFragProcs; 26 typedef SkSTArray<8, GrGLSLFragmentProcessor*, true> GrGLSLFragProcs;
27 27
28 class GrGLSLProgramBuilder { 28 class GrGLSLProgramBuilder {
29 public: 29 public:
30 typedef GrGpu::DrawArgs DrawArgs; 30 typedef GrGpu::DrawArgs DrawArgs;
31 typedef GrGLSLUniformHandler::ShaderVisibility ShaderVisibility;
32 typedef GrGLSLUniformHandler::UniformHandle UniformHandle; 31 typedef GrGLSLUniformHandler::UniformHandle UniformHandle;
33 32
34 virtual ~GrGLSLProgramBuilder() {} 33 virtual ~GrGLSLProgramBuilder() {}
35 34
36 virtual const GrCaps* caps() const = 0; 35 virtual const GrCaps* caps() const = 0;
37 virtual const GrGLSLCaps* glslCaps() const = 0; 36 virtual const GrGLSLCaps* glslCaps() const = 0;
38 37
39 const GrPrimitiveProcessor& primitiveProcessor() const { return *fArgs.fPrim itiveProcessor; } 38 const GrPrimitiveProcessor& primitiveProcessor() const { return *fArgs.fPrim itiveProcessor; }
40 const GrPipeline& pipeline() const { return *fArgs.fPipeline; } 39 const GrPipeline& pipeline() const { return *fArgs.fPipeline; }
41 const GrProgramDesc& desc() const { return *fArgs.fDesc; } 40 const GrProgramDesc& desc() const { return *fArgs.fDesc; }
42 const GrProgramDesc::KeyHeader& header() const { return fArgs.fDesc->header( ); } 41 const GrProgramDesc::KeyHeader& header() const { return fArgs.fDesc->header( ); }
43 42
44 void appendUniformDecls(ShaderVisibility, SkString*) const; 43 void appendUniformDecls(GrShaderFlags visibility, SkString*) const;
45 44
46 // Handles for program uniforms (other than per-effect uniforms) 45 // Handles for program uniforms (other than per-effect uniforms)
47 struct BuiltinUniformHandles { 46 struct BuiltinUniformHandles {
48 UniformHandle fRTAdjustmentUni; 47 UniformHandle fRTAdjustmentUni;
49 48
50 // We use the render target height to provide a y-down frag coord when s pecifying 49 // We use the render target height to provide a y-down frag coord when s pecifying
51 // origin_upper_left is not supported. 50 // origin_upper_left is not supported.
52 UniformHandle fRTHeightUni; 51 UniformHandle fRTHeightUni;
53 }; 52 };
54 53
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void verify(const GrFragmentProcessor&); 146 void verify(const GrFragmentProcessor&);
148 147
149 virtual void emitSamplers(const GrProcessor& processor, 148 virtual void emitSamplers(const GrProcessor& processor,
150 GrGLSLTextureSampler::TextureSamplerArray* outSamp lers) = 0; 149 GrGLSLTextureSampler::TextureSamplerArray* outSamp lers) = 0;
151 150
152 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms; 151 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms;
153 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords; 152 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords;
154 }; 153 };
155 154
156 #endif 155 #endif
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLPrimitiveProcessor.cpp ('k') | src/gpu/glsl/GrGLSLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698