OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/hash.h" | 9 #include "base/hash.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 total_gpu_memory_(0) { | 139 total_gpu_memory_(0) { |
140 active_url_hash_ = base::Hash(active_url.possibly_invalid_spec()); | 140 active_url_hash_ = base::Hash(active_url.possibly_invalid_spec()); |
141 FastSetActiveURL(active_url_, active_url_hash_); | 141 FastSetActiveURL(active_url_, active_url_hash_); |
142 if (share_group) { | 142 if (share_group) { |
143 context_group_ = share_group->context_group_; | 143 context_group_ = share_group->context_group_; |
144 } else { | 144 } else { |
145 context_group_ = new gpu::gles2::ContextGroup( | 145 context_group_ = new gpu::gles2::ContextGroup( |
146 mailbox_manager, | 146 mailbox_manager, |
147 image_manager, | 147 image_manager, |
148 new GpuCommandBufferMemoryTracker(channel), | 148 new GpuCommandBufferMemoryTracker(channel), |
| 149 channel_->gpu_channel_manager()->shader_translator_cache(), |
149 NULL, | 150 NULL, |
150 true); | 151 true); |
151 } | 152 } |
152 | 153 |
153 use_virtualized_gl_context_ |= | 154 use_virtualized_gl_context_ |= |
154 context_group_->feature_info()->workarounds().use_virtualized_gl_contexts; | 155 context_group_->feature_info()->workarounds().use_virtualized_gl_contexts; |
155 } | 156 } |
156 | 157 |
157 GpuCommandBufferStub::~GpuCommandBufferStub() { | 158 GpuCommandBufferStub::~GpuCommandBufferStub() { |
158 Destroy(); | 159 Destroy(); |
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 if (decoder_) | 965 if (decoder_) |
965 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); | 966 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); |
966 command_buffer_->SetParseError(gpu::error::kLostContext); | 967 command_buffer_->SetParseError(gpu::error::kLostContext); |
967 } | 968 } |
968 | 969 |
969 uint64 GpuCommandBufferStub::GetMemoryUsage() const { | 970 uint64 GpuCommandBufferStub::GetMemoryUsage() const { |
970 return GetMemoryManager()->GetClientMemoryUsage(this); | 971 return GetMemoryManager()->GetClientMemoryUsage(this); |
971 } | 972 } |
972 | 973 |
973 } // namespace content | 974 } // namespace content |
OLD | NEW |