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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 217813004: Make ShaderTranslatorCache thread safe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | gpu/command_buffer/service/context_group.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | gpu/command_buffer/service/context_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698