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

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

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

Powered by Google App Engine
This is Rietveld 408576698