| Index: content/common/gpu/gpu_channel_manager.cc
|
| diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
|
| index a9789ff3a61edd55a7e44af1bd7f00868d8f0a45..adf321738ffc6f4a5abd1cc3fa7656960b616e6d 100644
|
| --- a/content/common/gpu/gpu_channel_manager.cc
|
| +++ b/content/common/gpu/gpu_channel_manager.cc
|
| @@ -11,8 +11,11 @@
|
| #include "content/common/gpu/gpu_messages.h"
|
| #include "content/common/gpu/sync_point_manager.h"
|
| #include "gpu/command_buffer/service/mailbox_manager.h"
|
| +#include "gpu/command_buffer/service/memory_shader_cache.h"
|
| #include "ui/gl/gl_share_group.h"
|
|
|
| +using base::WeakPtr;
|
| +
|
| GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread,
|
| GpuWatchdog* watchdog,
|
| base::MessageLoopProxy* io_message_loop,
|
| @@ -24,7 +27,8 @@ GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread,
|
| ALLOW_THIS_IN_INITIALIZER_LIST(gpu_memory_manager_(this,
|
| GpuMemoryManager::kDefaultMaxSurfacesWithFrontbufferSoftLimit)),
|
| watchdog_(watchdog),
|
| - sync_point_manager_(new SyncPointManager) {
|
| + sync_point_manager_(new SyncPointManager),
|
| + shader_cache_(new gpu::MemoryShaderCache()){
|
| DCHECK(gpu_child_thread);
|
| DCHECK(io_message_loop);
|
| DCHECK(shutdown_event);
|
| @@ -101,12 +105,17 @@ void GpuChannelManager::OnEstablishChannel(int client_id, bool share_context) {
|
| mailbox_manager = mailbox_manager_;
|
| }
|
|
|
| + WeakPtr<gpu::ShaderCache> shader_cache_ptr =
|
| + shader_cache_.get() == NULL ?
|
| + shader_cache_ptr = WeakPtr<gpu::ShaderCache>() :
|
| + shader_cache_ptr = shader_cache_->AsWeakPtr();
|
| scoped_refptr<GpuChannel> channel = new GpuChannel(this,
|
| watchdog_,
|
| share_group,
|
| mailbox_manager,
|
| client_id,
|
| - false);
|
| + false,
|
| + shader_cache_ptr);
|
| if (channel->Init(io_message_loop_, shutdown_event_)) {
|
| gpu_channels_[client_id] = channel;
|
| channel_handle.name = channel->GetChannelName();
|
|
|