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

Side by Side Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 1278333003: Fix crash caused by concurrent access to framebuffer_combo_complete_map_. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "gpu/command_buffer/service/in_process_command_buffer.h" 5 #include "gpu/command_buffer/service/in_process_command_buffer.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 : service_->share_group(); 292 : service_->share_group();
293 293
294 #if defined(OS_ANDROID) 294 #if defined(OS_ANDROID)
295 stream_texture_manager_.reset(new StreamTextureManagerInProcess); 295 stream_texture_manager_.reset(new StreamTextureManagerInProcess);
296 #endif 296 #endif
297 297
298 bool bind_generates_resource = false; 298 bool bind_generates_resource = false;
299 decoder_.reset(gles2::GLES2Decoder::Create( 299 decoder_.reset(gles2::GLES2Decoder::Create(
300 params.context_group 300 params.context_group
301 ? params.context_group->decoder_->GetContextGroup() 301 ? params.context_group->decoder_->GetContextGroup()
302 : new gles2::ContextGroup(service_->mailbox_manager(), 302 : new gles2::ContextGroup(service_->mailbox_manager(), NULL,
303 NULL,
304 service_->shader_translator_cache(), 303 service_->shader_translator_cache(),
305 NULL, 304 service_->framebuffer_completeness_cache(),
306 service_->subscription_ref_set(), 305 NULL, service_->subscription_ref_set(),
307 service_->pending_valuebuffer_state(), 306 service_->pending_valuebuffer_state(),
308 bind_generates_resource))); 307 bind_generates_resource)));
309 308
310 gpu_scheduler_.reset( 309 gpu_scheduler_.reset(
311 new GpuScheduler(command_buffer.get(), decoder_.get(), decoder_.get())); 310 new GpuScheduler(command_buffer.get(), decoder_.get(), decoder_.get()));
312 command_buffer->SetGetBufferChangeCallback(base::Bind( 311 command_buffer->SetGetBufferChangeCallback(base::Bind(
313 &GpuScheduler::SetGetBuffer, base::Unretained(gpu_scheduler_.get()))); 312 &GpuScheduler::SetGetBuffer, base::Unretained(gpu_scheduler_.get())));
314 command_buffer_ = command_buffer.Pass(); 313 command_buffer_ = command_buffer.Pass();
315 314
316 decoder_->set_engine(gpu_scheduler_.get()); 315 decoder_->set_engine(gpu_scheduler_.get());
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 return false; 917 return false;
919 } 918 }
920 919
921 scoped_refptr<gles2::ShaderTranslatorCache> 920 scoped_refptr<gles2::ShaderTranslatorCache>
922 GpuInProcessThread::shader_translator_cache() { 921 GpuInProcessThread::shader_translator_cache() {
923 if (!shader_translator_cache_.get()) 922 if (!shader_translator_cache_.get())
924 shader_translator_cache_ = new gpu::gles2::ShaderTranslatorCache; 923 shader_translator_cache_ = new gpu::gles2::ShaderTranslatorCache;
925 return shader_translator_cache_; 924 return shader_translator_cache_;
926 } 925 }
927 926
927 scoped_refptr<gles2::FramebufferCompletenessCache>
928 GpuInProcessThread::framebuffer_completeness_cache() {
929 if (!framebuffer_completeness_cache_.get())
930 framebuffer_completeness_cache_ =
931 new gpu::gles2::FramebufferCompletenessCache;
932 return framebuffer_completeness_cache_;
933 }
934
928 SyncPointManager* GpuInProcessThread::sync_point_manager() { 935 SyncPointManager* GpuInProcessThread::sync_point_manager() {
929 return sync_point_manager_; 936 return sync_point_manager_;
930 } 937 }
931 938
932 } // namespace gpu 939 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | gpu/command_buffer/service/texture_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698