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

Side by Side Diff: content/common/gpu/gpu_channel_manager.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
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('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 "content/common/gpu/gpu_channel_manager.h" 5 #include "content/common/gpu/gpu_channel_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return program_cache_.get(); 72 return program_cache_.get();
73 } 73 }
74 74
75 gpu::gles2::ShaderTranslatorCache* 75 gpu::gles2::ShaderTranslatorCache*
76 GpuChannelManager::shader_translator_cache() { 76 GpuChannelManager::shader_translator_cache() {
77 if (!shader_translator_cache_.get()) 77 if (!shader_translator_cache_.get())
78 shader_translator_cache_ = new gpu::gles2::ShaderTranslatorCache; 78 shader_translator_cache_ = new gpu::gles2::ShaderTranslatorCache;
79 return shader_translator_cache_.get(); 79 return shader_translator_cache_.get();
80 } 80 }
81 81
82 gpu::gles2::FramebufferCompletenessCache*
83 GpuChannelManager::framebuffer_completeness_cache() {
84 if (!framebuffer_completeness_cache_.get())
85 framebuffer_completeness_cache_ =
86 new gpu::gles2::FramebufferCompletenessCache;
87 return framebuffer_completeness_cache_.get();
88 }
89
82 void GpuChannelManager::RemoveChannel(int client_id) { 90 void GpuChannelManager::RemoveChannel(int client_id) {
83 Send(new GpuHostMsg_DestroyChannel(client_id)); 91 Send(new GpuHostMsg_DestroyChannel(client_id));
84 gpu_channels_.erase(client_id); 92 gpu_channels_.erase(client_id);
85 } 93 }
86 94
87 int GpuChannelManager::GenerateRouteID() { 95 int GpuChannelManager::GenerateRouteID() {
88 static int last_id = 0; 96 static int last_id = 0;
89 return ++last_id; 97 return ++last_id;
90 } 98 }
91 99
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 287 }
280 return default_offscreen_surface_.get(); 288 return default_offscreen_surface_.get();
281 } 289 }
282 290
283 void GpuChannelManager::OnFinalize() { 291 void GpuChannelManager::OnFinalize() {
284 // Quit the GPU process 292 // Quit the GPU process
285 base::MessageLoop::current()->Quit(); 293 base::MessageLoop::current()->Quit();
286 } 294 }
287 295
288 } // namespace content 296 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698