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

Unified Diff: gpu/command_buffer/service/context_group.cc

Issue 10534173: GPU Program Caching (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: memory limit + lru Created 8 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/context_group.cc
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc
index cc86ce508a0550eacf25da42b5c49e47d5e27af0..f6f27f99a44f99cf5ca79fb7422a5b55f2aa9d89 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -26,7 +26,8 @@ namespace gles2 {
ContextGroup::ContextGroup(
MailboxManager* mailbox_manager,
- bool bind_generates_resource)
+ bool bind_generates_resource,
+ ProgramCache* program_cache)
: mailbox_manager_(mailbox_manager ? mailbox_manager : new MailboxManager),
num_contexts_(0),
enforce_gl_minimums_(CommandLine::ForCurrentProcess()->HasSwitch(
@@ -39,6 +40,7 @@ ContextGroup::ContextGroup(
max_fragment_uniform_vectors_(0u),
max_varying_vectors_(0u),
max_vertex_uniform_vectors_(0u),
+ program_cache_(program_cache),
feature_info_(new FeatureInfo()) {
{
TransferBufferManager* manager = new TransferBufferManager();
@@ -93,7 +95,7 @@ bool ContextGroup::Initialize(const DisallowedFeatures& disallowed_features,
renderbuffer_manager_.reset(new RenderbufferManager(
max_renderbuffer_size, max_samples));
shader_manager_.reset(new ShaderManager());
- program_manager_.reset(new ProgramManager());
+ program_manager_.reset(new ProgramManager(program_cache_));
// Lookup GL things we need to know.
const GLint kGLES2RequiredMinimumVertexAttribs = 8u;

Powered by Google App Engine
This is Rietveld 408576698