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

Side by Side Diff: gpu/gles2_conform_support/egl/display.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 | « gpu/command_buffer/tests/gl_manager.cc ('k') | mojo/services/gles2/command_buffer_impl.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 "gpu/gles2_conform_support/egl/display.h" 5 #include "gpu/gles2_conform_support/egl/display.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "gpu/command_buffer/client/gles2_implementation.h" 10 #include "gpu/command_buffer/client/gles2_implementation.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 { 106 {
107 gpu::TransferBufferManager* manager = new gpu::TransferBufferManager(); 107 gpu::TransferBufferManager* manager = new gpu::TransferBufferManager();
108 transfer_buffer_manager_.reset(manager); 108 transfer_buffer_manager_.reset(manager);
109 manager->Initialize(); 109 manager->Initialize();
110 } 110 }
111 scoped_ptr<gpu::CommandBufferService> command_buffer( 111 scoped_ptr<gpu::CommandBufferService> command_buffer(
112 new gpu::CommandBufferService(transfer_buffer_manager_.get())); 112 new gpu::CommandBufferService(transfer_buffer_manager_.get()));
113 if (!command_buffer->Initialize()) 113 if (!command_buffer->Initialize())
114 return NULL; 114 return NULL;
115 115
116 scoped_refptr<gpu::gles2::ContextGroup> group( 116 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup(
117 new gpu::gles2::ContextGroup(NULL, NULL, NULL, NULL, true)); 117 NULL, NULL, NULL, new gpu::gles2::ShaderTranslatorCache, NULL, true));
118 118
119 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); 119 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get()));
120 if (!decoder_.get()) 120 if (!decoder_.get())
121 return EGL_NO_SURFACE; 121 return EGL_NO_SURFACE;
122 122
123 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), 123 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(),
124 decoder_.get(), 124 decoder_.get(),
125 NULL)); 125 NULL));
126 126
127 decoder_->set_engine(gpu_scheduler_.get()); 127 decoder_->set_engine(gpu_scheduler_.get());
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 } else { 265 } else {
266 DCHECK(IsValidSurface(draw)); 266 DCHECK(IsValidSurface(draw));
267 DCHECK(IsValidSurface(read)); 267 DCHECK(IsValidSurface(read));
268 DCHECK(IsValidContext(ctx)); 268 DCHECK(IsValidContext(ctx));
269 gles2::SetGLContext(context_.get()); 269 gles2::SetGLContext(context_.get());
270 } 270 }
271 return true; 271 return true;
272 } 272 }
273 273
274 } // namespace egl 274 } // namespace egl
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.cc ('k') | mojo/services/gles2/command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698