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

Side by Side Diff: src/gpu/gl/GrGLPathProcessor.h

Issue 1186113007: Refactor separable varying location info to be stored in GrGLProgram subclass (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comments Created 5 years, 6 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 | « gyp/gpu.gypi ('k') | src/gpu/gl/GrGLPathProcessor.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 2013 Google Inc. 2 * Copyright 2013 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 GrGLPathProcessor_DEFINED 8 #ifndef GrGLPathProcessor_DEFINED
9 #define GrGLPathProcessor_DEFINED 9 #define GrGLPathProcessor_DEFINED
10 10
11 #include "GrGLPrimitiveProcessor.h" 11 #include "GrGLPrimitiveProcessor.h"
12 12
13 class GrPathProcessor; 13 class GrPathProcessor;
14 class GrGLPathRendering; 14 class GrGLPathRendering;
15 class GrGLGpu; 15 class GrGLGpu;
16 class GrGLPathProgramDataManager;
16 17
17 class GrGLPathProcessor : public GrGLPrimitiveProcessor { 18 class GrGLPathProcessor : public GrGLPrimitiveProcessor {
18 public: 19 public:
19 GrGLPathProcessor(const GrPathProcessor&, const GrBatchTracker&); 20 GrGLPathProcessor(const GrPathProcessor&, const GrBatchTracker&);
20 21
21 static void GenKey(const GrPathProcessor&, 22 static void GenKey(const GrPathProcessor&,
22 const GrBatchTracker& bt, 23 const GrBatchTracker& bt,
23 const GrGLSLCaps&, 24 const GrGLSLCaps&,
24 GrProcessorKeyBuilder* b); 25 GrProcessorKeyBuilder* b);
25 26
26 void emitCode(EmitArgs&) override; 27 void emitCode(EmitArgs&) override;
27 28
28 void emitTransforms(GrGLGPBuilder*, const TransformsIn&, TransformsOut*); 29 void emitTransforms(GrGLGPBuilder*, const TransformsIn&, TransformsOut*);
29 30
31 void bindSeparableVaryings(GrGLGpu* gpu, GrGLuint programID);
30 void resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId); 32 void resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId);
31 33
32 void setData(const GrGLProgramDataManager&, 34 void setData(const GrGLProgramDataManager&,
33 const GrPrimitiveProcessor&, 35 const GrPrimitiveProcessor&,
34 const GrBatchTracker&) override; 36 const GrBatchTracker&) override;
35 37
36 void setTransformData(const GrPrimitiveProcessor&, 38 void setTransformData(const GrPrimitiveProcessor&,
39 const GrGLPathProgramDataManager&,
37 int index, 40 int index,
38 const SkTArray<const GrCoordTransform*, true>& transfo rms, 41 const SkTArray<const GrCoordTransform*, true>& transfo rms);
39 GrGLPathRendering*,
40 GrGLuint programID);
41 42
42 virtual void didSetData(GrGLPathRendering*) {} 43 virtual void didSetData(GrGLPathRendering*) {}
43 44
44 private: 45 private:
45 UniformHandle fColorUniform; 46 UniformHandle fColorUniform;
46 GrColor fColor; 47 GrColor fColor;
47 struct SeparableVaryingInfo {
48 GrSLType fType;
49 GrGLShaderVar fVariable;
50 GrGLint fLocation;
51 };
52
53 typedef SkSTArray<8, SeparableVaryingInfo, true> SeparableVaryingInfoArray;
54
55 SeparableVaryingInfoArray fSeparableVaryingInfos;
56 48
57 typedef GrGLPrimitiveProcessor INHERITED; 49 typedef GrGLPrimitiveProcessor INHERITED;
58 }; 50 };
59 51
60 #endif 52 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/gl/GrGLPathProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698