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

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

Issue 1336763003: remove path specific program building classes (Closed) Base URL: https://skia.googlesource.com/skia.git@pathgp
Patch Set: a few more tidys Created 5 years, 3 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/GrGLPathProgram.cpp ('k') | src/gpu/gl/GrGLPathProgramDataManager.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrGLPathProgramDataManager_DEFINED
9 #define GrGLPathProgramDataManager_DEFINED
10
11 #include "gl/GrGLProgramDataManager.h"
12
13 class GrGLPathProgram;
14 class GrGLPathProgramBuilder;
15
16 /** Manages the resources used by a shader program for NVPR rendering.
17 */
18 class GrGLPathProgramDataManager : SkNoncopyable {
19 public:
20 typedef GrGLProgramDataManager::ShaderResourceHandle SeparableVaryingHandle;
21
22 struct SeparableVaryingInfo {
23 GrGLShaderVar fVariable;
24 GrGLint fLocation;
25 };
26
27 // This uses an allocator rather than array so that the GrGLShaderVars don't move in memory
28 // after they are inserted. Users of GrGLShaderBuilder get refs to the vars and ptrs to their
29 // name strings. Otherwise, we'd have to hand out copies.
30 typedef GrTAllocator<SeparableVaryingInfo> SeparableVaryingInfoArray;
31
32 GrGLPathProgramDataManager(GrGLGpu*, GrGLuint programID, const SeparableVary ingInfoArray&);
33
34 /** Functions for uploading the varying values.
35 */
36 void setPathFragmentInputTransform(SeparableVaryingHandle u,
37 int components,
38 const SkMatrix& matrix) const;
39 private:
40 enum {
41 kUnusedSeparableVarying = -1,
42 };
43 struct SeparableVarying {
44 GrGLint fLocation;
45 SkDEBUGCODE(
46 GrSLType fType;
47 int fArrayCount;
48 );
49 };
50 SkTArray<SeparableVarying, true> fSeparableVaryings;
51 GrGLGpu* fGpu;
52 GrGLuint fProgramID;
53 typedef SkNoncopyable INHERITED;
54 };
55 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathProgram.cpp ('k') | src/gpu/gl/GrGLPathProgramDataManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698