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

Unified Diff: gpu/command_buffer/service/shader_manager.h

Issue 1696012: Added shader type to shader info. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/shader_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/shader_manager.h
===================================================================
--- gpu/command_buffer/service/shader_manager.h (revision 45803)
+++ gpu/command_buffer/service/shader_manager.h (working copy)
@@ -28,8 +28,9 @@
public:
typedef scoped_refptr<ShaderInfo> Ref;
- explicit ShaderInfo(GLuint service_id)
- : service_id_(service_id) {
+ explicit ShaderInfo(GLuint service_id, GLenum shader_type)
+ : service_id_(service_id),
+ shader_type_(shader_type) {
}
void Update(const std::string& source) {
@@ -40,11 +41,15 @@
return service_id_;
}
- const std::string& source() {
+ GLenum shader_type() const {
+ return shader_type_;
+ }
+
+ const std::string& source() const {
return source_;
}
- bool IsDeleted() {
+ bool IsDeleted() const {
return service_id_ == 0;
}
@@ -59,6 +64,8 @@
// The shader this ShaderInfo is tracking.
GLuint service_id_;
+ // Type of shader - GL_VERTEX_SHADER or GL_FRAGMENT_SHADER.
+ GLenum shader_type_;
// The shader source as passed to glShaderSource.
std::string source_;
@@ -68,7 +75,9 @@
}
// Creates a shader info for the given shader ID.
- void CreateShaderInfo(GLuint client_id, GLuint service_id);
+ void CreateShaderInfo(GLuint client_id,
+ GLuint service_id,
+ GLenum shader_type);
// Gets an existing shader info for the given shader ID. Returns NULL if none
// exists.
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/shader_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698