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/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 total_gpu_memory_(0) { | 179 total_gpu_memory_(0) { |
180 active_url_hash_ = base::Hash(active_url.possibly_invalid_spec()); | 180 active_url_hash_ = base::Hash(active_url.possibly_invalid_spec()); |
181 FastSetActiveURL(active_url_, active_url_hash_); | 181 FastSetActiveURL(active_url_, active_url_hash_); |
182 | 182 |
183 gpu::gles2::ContextCreationAttribHelper attrib_parser; | 183 gpu::gles2::ContextCreationAttribHelper attrib_parser; |
184 attrib_parser.Parse(requested_attribs_); | 184 attrib_parser.Parse(requested_attribs_); |
185 | 185 |
186 if (share_group) { | 186 if (share_group) { |
187 context_group_ = share_group->context_group_; | 187 context_group_ = share_group->context_group_; |
188 DCHECK(context_group_->bind_generates_resource() == | 188 DCHECK(context_group_->bind_generates_resource() == |
189 attrib_parser.bind_generates_resource_); | 189 attrib_parser.bind_generates_resource); |
190 } else { | 190 } else { |
191 context_group_ = new gpu::gles2::ContextGroup( | 191 context_group_ = new gpu::gles2::ContextGroup( |
192 mailbox_manager, | 192 mailbox_manager, |
193 new GpuCommandBufferMemoryTracker(channel), | 193 new GpuCommandBufferMemoryTracker(channel), |
194 channel_->gpu_channel_manager()->shader_translator_cache(), | 194 channel_->gpu_channel_manager()->shader_translator_cache(), |
195 NULL, | 195 NULL, |
196 attrib_parser.bind_generates_resource_); | 196 attrib_parser.bind_generates_resource); |
197 } | 197 } |
198 | 198 |
199 use_virtualized_gl_context_ |= | 199 use_virtualized_gl_context_ |= |
200 context_group_->feature_info()->workarounds().use_virtualized_gl_contexts; | 200 context_group_->feature_info()->workarounds().use_virtualized_gl_contexts; |
201 } | 201 } |
202 | 202 |
203 GpuCommandBufferStub::~GpuCommandBufferStub() { | 203 GpuCommandBufferStub::~GpuCommandBufferStub() { |
204 Destroy(); | 204 Destroy(); |
205 | 205 |
206 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); | 206 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); |
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 if (decoder_) | 1101 if (decoder_) |
1102 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); | 1102 decoder_->LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); |
1103 command_buffer_->SetParseError(gpu::error::kLostContext); | 1103 command_buffer_->SetParseError(gpu::error::kLostContext); |
1104 } | 1104 } |
1105 | 1105 |
1106 uint64 GpuCommandBufferStub::GetMemoryUsage() const { | 1106 uint64 GpuCommandBufferStub::GetMemoryUsage() const { |
1107 return GetMemoryManager()->GetClientMemoryUsage(this); | 1107 return GetMemoryManager()->GetClientMemoryUsage(this); |
1108 } | 1108 } |
1109 | 1109 |
1110 } // namespace content | 1110 } // namespace content |
OLD | NEW |