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

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

Issue 10795037: Revert 147328 - Current status of patch: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/program_cache_unittest.cc ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/program_manager.h
===================================================================
--- gpu/command_buffer/service/program_manager.h (revision 147496)
+++ gpu/command_buffer/service/program_manager.h (working copy)
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "gpu/command_buffer/service/common_decoder.h"
#include "gpu/command_buffer/service/gl_utils.h"
#include "gpu/command_buffer/service/shader_manager.h"
@@ -18,8 +19,6 @@
namespace gpu {
namespace gles2 {
-class ProgramCache;
-class FeatureInfo;
// Tracks the Programs.
//
@@ -27,8 +26,6 @@
// need to be shared by multiple GLES2Decoders.
class GPU_EXPORT ProgramManager {
public:
- typedef std::map<std::string, GLint> LocationMap;
-
// This is used to track which attributes a particular program needs
// so we can verify at glDrawXXX time that every attribute is either disabled
// or if enabled that it points to a valid source.
@@ -153,10 +150,7 @@
bool CanLink() const;
// Performs glLinkProgram and related activities.
- bool Link(ShaderManager* manager,
- ShaderTranslator* vertex_translator,
- ShaderTranslator* fragment_shader,
- FeatureInfo* feature_info);
+ bool Link();
// Performs glValidateProgram and related activities.
void Validate();
@@ -184,15 +178,12 @@
// We only consider the declared attributes in the program.
bool DetectAttribLocationBindingConflicts() const;
- // Visible for testing
- const LocationMap& bind_attrib_location_map() const {
- return bind_attrib_location_map_;
- }
-
private:
friend class base::RefCounted<ProgramInfo>;
friend class ProgramManager;
+ typedef std::map<std::string, GLint> LocationMap;
+
~ProgramInfo();
void set_log_info(const char* str) {
@@ -308,7 +299,7 @@
LocationMap bind_uniform_location_map_;
};
- explicit ProgramManager(ProgramCache* program_cache);
+ ProgramManager();
~ProgramManager();
// Must call before destruction.
@@ -323,9 +314,6 @@
// Gets a client id for a given service id.
bool GetClientId(GLuint service_id, GLuint* client_id) const;
- // Gets the shader cache
- ProgramCache* program_cache() const;
-
// Marks a program as deleted. If it is not used the info will be deleted.
void MarkAsDeleted(ShaderManager* shader_manager, ProgramInfo* info);
@@ -346,19 +334,7 @@
static int32 MakeFakeLocation(int32 index, int32 element);
- // Cache-aware shader compiling. If no cache or if the shader wasn't
- // previously compiled, ForceCompileShader is called
- void DoCompileShader(ShaderManager::ShaderInfo* info,
- ShaderTranslator* translator,
- FeatureInfo* feature_info);
-
private:
- // Actually compiles the shader
- void ForceCompileShader(const std::string* source,
- ShaderManager::ShaderInfo* info,
- ShaderTranslator* translator,
- FeatureInfo* feature_info);
-
void StartTracking(ProgramInfo* info);
void StopTracking(ProgramInfo* info);
@@ -378,8 +354,6 @@
// Used to clear uniforms.
std::vector<uint8> zero_;
- ProgramCache* program_cache_;
-
void RemoveProgramInfoIfUnused(
ShaderManager* shader_manager, ProgramInfo* info);
« no previous file with comments | « gpu/command_buffer/service/program_cache_unittest.cc ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698