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

Side by Side Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 217813004: Make ShaderTranslatorCache thread safe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: protect ShFinalize 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
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 "gpu/command_buffer/tests/gl_manager.h" 5 #include "gpu/command_buffer/tests/gl_manager.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 gpu_preference); 157 gpu_preference);
158 } 158 }
159 } 159 }
160 ASSERT_TRUE(context_.get() != NULL) << "could not create GL context"; 160 ASSERT_TRUE(context_.get() != NULL) << "could not create GL context";
161 161
162 ASSERT_TRUE(context_->MakeCurrent(surface_.get())); 162 ASSERT_TRUE(context_->MakeCurrent(surface_.get()));
163 163
164 ASSERT_TRUE(decoder_->Initialize( 164 ASSERT_TRUE(decoder_->Initialize(
165 surface_.get(), 165 surface_.get(),
166 context_.get(), 166 context_.get(),
167 new gpu::gles2::ShaderTranslatorCache,
167 true, 168 true,
168 options.size, 169 options.size,
169 ::gpu::gles2::DisallowedFeatures(), 170 ::gpu::gles2::DisallowedFeatures(),
170 attribs)) << "could not initialize decoder"; 171 attribs)) << "could not initialize decoder";
171 172
172 gpu_control_.reset( 173 gpu_control_.reset(
173 new GpuControlService(decoder_->GetContextGroup()->image_manager(), 174 new GpuControlService(decoder_->GetContextGroup()->image_manager(),
174 options.gpu_memory_buffer_factory, 175 options.gpu_memory_buffer_factory,
175 decoder_->GetContextGroup()->mailbox_manager(), 176 decoder_->GetContextGroup()->mailbox_manager(),
176 decoder_->GetQueryManager(), 177 decoder_->GetQueryManager(),
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 if (!context_lost_allowed_) { 261 if (!context_lost_allowed_) {
261 ASSERT_EQ(::gpu::error::kNoError, state.error); 262 ASSERT_EQ(::gpu::error::kNoError, state.error);
262 } 263 }
263 } 264 }
264 265
265 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { 266 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) {
266 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); 267 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id);
267 } 268 }
268 269
269 } // namespace gpu 270 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698