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

Side by Side Diff: gpu/command_buffer/service/sampler_manager.h

Issue 2556623002: Implement GetIntegerv(SAMPLER_BINDING/TRANSFORM_FEEDBACK_BINDING) in command buffer. (Closed)
Patch Set: fix Created 4 years 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 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_SAMPLER_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_SAMPLER_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_SAMPLER_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_SAMPLER_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 19 matching lines...) Expand all
30 GLenum wrap_s; 30 GLenum wrap_s;
31 GLenum wrap_t; 31 GLenum wrap_t;
32 GLenum compare_func; 32 GLenum compare_func;
33 GLenum compare_mode; 33 GLenum compare_mode;
34 GLfloat max_lod; 34 GLfloat max_lod;
35 GLfloat min_lod; 35 GLfloat min_lod;
36 }; 36 };
37 37
38 class GPU_EXPORT Sampler : public base::RefCounted<Sampler> { 38 class GPU_EXPORT Sampler : public base::RefCounted<Sampler> {
39 public: 39 public:
40 Sampler(SamplerManager* manager, GLuint service_id); 40 Sampler(SamplerManager* manager, GLuint client_id, GLuint service_id);
41 41
42 // The service side OpenGL id of the texture. 42 GLuint client_id() const {
43 return client_id_;
44 }
45
43 GLuint service_id() const { 46 GLuint service_id() const {
44 return service_id_; 47 return service_id_;
45 } 48 }
46 49
47 const SamplerState& sampler_state() const { 50 const SamplerState& sampler_state() const {
48 return sampler_state_; 51 return sampler_state_;
49 } 52 }
50 53
51 // Sampler parameters 54 // Sampler parameters
52 GLenum min_filter() const { 55 GLenum min_filter() const {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // Sets a sampler parameter. 110 // Sets a sampler parameter.
108 // Returns GL_NO_ERROR on success. Otherwise the error to generate. 111 // Returns GL_NO_ERROR on success. Otherwise the error to generate.
109 GLenum SetParameteri( 112 GLenum SetParameteri(
110 const FeatureInfo* feature_info, GLenum pname, GLint param); 113 const FeatureInfo* feature_info, GLenum pname, GLint param);
111 GLenum SetParameterf( 114 GLenum SetParameterf(
112 const FeatureInfo* feature_info, GLenum pname, GLfloat param); 115 const FeatureInfo* feature_info, GLenum pname, GLfloat param);
113 116
114 // The manager that owns this Sampler. 117 // The manager that owns this Sampler.
115 SamplerManager* manager_; 118 SamplerManager* manager_;
116 119
117 // The id of the texure 120 GLuint client_id_;
118 GLuint service_id_; 121 GLuint service_id_;
119 122
120 // Sampler parameters. 123 // Sampler parameters.
121 SamplerState sampler_state_; 124 SamplerState sampler_state_;
122 125
123 // True if deleted. 126 // True if deleted.
124 bool deleted_; 127 bool deleted_;
125 }; 128 };
126 129
127 // This class keeps track of the samplers and their state. 130 // This class keeps track of the samplers and their state.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 165
163 bool have_context_; 166 bool have_context_;
164 167
165 DISALLOW_COPY_AND_ASSIGN(SamplerManager); 168 DISALLOW_COPY_AND_ASSIGN(SamplerManager);
166 }; 169 };
167 170
168 } // namespace gles2 171 } // namespace gles2
169 } // namespace gpu 172 } // namespace gpu
170 173
171 #endif // GPU_COMMAND_BUFFER_SERVICE_SAMPLER_MANAGER_H_ 174 #endif // GPU_COMMAND_BUFFER_SERVICE_SAMPLER_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc ('k') | gpu/command_buffer/service/sampler_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698