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

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

Issue 9309047: Swizzle Uniform Locations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unsigned math Created 8 years, 10 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
Index: gpu/command_buffer/service/program_manager.h
diff --git a/gpu/command_buffer/service/program_manager.h b/gpu/command_buffer/service/program_manager.h
index aa331de60bb5707f0510ff571df19cb4a671b395..15fde2efa43147b3918a8026263eaf42b77f7200 100644
--- a/gpu/command_buffer/service/program_manager.h
+++ b/gpu/command_buffer/service/program_manager.h
@@ -112,7 +112,8 @@ class ProgramManager {
GLint location, GLint* array_index) const;
// Gets all the program info.
- void GetProgramInfo(CommonDecoder::Bucket* bucket) const;
+ void GetProgramInfo(
+ ProgramManager* manager, CommonDecoder::Bucket* bucket) const;
// Sets the sampler values for a uniform.
// This is safe to call for any location. If the location is not
@@ -277,12 +278,17 @@ class ProgramManager {
// Check if a ProgramInfo is owned by this ProgramManager.
bool IsOwned(ProgramInfo* info);
+ GLint SwizzleLocation(GLint unswizzled_location) const;
+ GLint UnswizzleLocation(GLint swizzled_location) const;
+
private:
// Info for each "successfully linked" program by service side program Id.
// TODO(gman): Choose a faster container.
typedef std::map<GLuint, ProgramInfo::Ref> ProgramInfoMap;
ProgramInfoMap program_infos_;
+ int uniform_swizzle_;
+
void RemoveProgramInfoIfUnused(
ShaderManager* shader_manager, ProgramInfo* info);
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698