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

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

Issue 2080133002: Revert of Integers can now be passed as uniforms (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « src/gpu/gl/GrGLProgramDataManager.cpp ('k') | no next file » | 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 GrGLSLProgramDataManager_DEFINED 8 #ifndef GrGLSLProgramDataManager_DEFINED
9 #define GrGLSLProgramDataManager_DEFINED 9 #define GrGLSLProgramDataManager_DEFINED
10 10
11 #include "GrResourceHandle.h" 11 #include "GrResourceHandle.h"
12 #include "SkTypes.h" 12 #include "SkTypes.h"
13 13
14 class SkMatrix; 14 class SkMatrix;
15 15
16 /** Manages the resources used by a shader program. 16 /** Manages the resources used by a shader program.
17 * The resources are objects the program uses to communicate with the 17 * The resources are objects the program uses to communicate with the
18 * application code. 18 * application code.
19 */ 19 */
20 class GrGLSLProgramDataManager : SkNoncopyable { 20 class GrGLSLProgramDataManager : SkNoncopyable {
21 public: 21 public:
22 GR_DEFINE_RESOURCE_HANDLE_CLASS(UniformHandle); 22 GR_DEFINE_RESOURCE_HANDLE_CLASS(UniformHandle);
23 23
24 virtual ~GrGLSLProgramDataManager() {} 24 virtual ~GrGLSLProgramDataManager() {}
25 25
26 /** Functions for uploading uniform values. The varities ending in v can be used to upload to an 26 /** Functions for uploading uniform values. The varities ending in v can be used to upload to an
27 * array of uniforms. arrayCount must be <= the array count of the uniform. 27 * array of uniforms. arrayCount must be <= the array count of the uniform.
28 */ 28 */
29 virtual void set1i(UniformHandle, int) const = 0;
30 virtual void set1f(UniformHandle, float v0) const = 0; 29 virtual void set1f(UniformHandle, float v0) const = 0;
31 virtual void set1fv(UniformHandle, int arrayCount, const float v[]) const = 0; 30 virtual void set1fv(UniformHandle, int arrayCount, const float v[]) const = 0;
32 virtual void set2f(UniformHandle, float, float) const = 0; 31 virtual void set2f(UniformHandle, float, float) const = 0;
33 virtual void set2fv(UniformHandle, int arrayCount, const float v[]) const = 0; 32 virtual void set2fv(UniformHandle, int arrayCount, const float v[]) const = 0;
34 virtual void set3f(UniformHandle, float, float, float) const = 0; 33 virtual void set3f(UniformHandle, float, float, float) const = 0;
35 virtual void set3fv(UniformHandle, int arrayCount, const float v[]) const = 0; 34 virtual void set3fv(UniformHandle, int arrayCount, const float v[]) const = 0;
36 virtual void set4f(UniformHandle, float, float, float, float) const = 0; 35 virtual void set4f(UniformHandle, float, float, float, float) const = 0;
37 virtual void set4fv(UniformHandle, int arrayCount, const float v[]) const = 0; 36 virtual void set4fv(UniformHandle, int arrayCount, const float v[]) const = 0;
38 // matrices are column-major, the first three upload a single matrix, the la tter three upload 37 // matrices are column-major, the first three upload a single matrix, the la tter three upload
39 // arrayCount matrices into a uniform array. 38 // arrayCount matrices into a uniform array.
(...skipping 13 matching lines...) Expand all
53 const SkMatrix& matrix) const = 0 ; 52 const SkMatrix& matrix) const = 0 ;
54 53
55 protected: 54 protected:
56 GrGLSLProgramDataManager() {} 55 GrGLSLProgramDataManager() {}
57 56
58 private: 57 private:
59 typedef SkNoncopyable INHERITED; 58 typedef SkNoncopyable INHERITED;
60 }; 59 };
61 60
62 #endif 61 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgramDataManager.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698