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

Unified Diff: mojo/services/gles2/command_buffer_impl.cc

Issue 217813004: Make ShaderTranslatorCache thread safe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/gles2_conform_support/egl/display.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/gles2/command_buffer_impl.cc
diff --git a/mojo/services/gles2/command_buffer_impl.cc b/mojo/services/gles2/command_buffer_impl.cc
index 7d33b722cd8ddb24fc0fab5e4a392fa0b4698643..7a546b60986597a4f7d848cb680d76ace276f7ad 100644
--- a/mojo/services/gles2/command_buffer_impl.cc
+++ b/mojo/services/gles2/command_buffer_impl.cc
@@ -77,9 +77,16 @@ bool CommandBufferImpl::DoInitialize(const ShmHandle& shared_state) {
if (!context->MakeCurrent(surface.get()))
return false;
+ // TODO(piman): ShaderTranslatorCache is currently per-ContextGroup but
+ // only needs to be per-thread.
scoped_refptr<gpu::gles2::ContextGroup> context_group =
- new gpu::gles2::ContextGroup(
- NULL, NULL, new MemoryTrackerStub(), NULL, true);
+ new gpu::gles2::ContextGroup(NULL,
+ NULL,
+ new MemoryTrackerStub,
+ new gpu::gles2::ShaderTranslatorCache,
+ NULL,
+ true);
+
command_buffer_.reset(
new gpu::CommandBufferService(context_group->transfer_buffer_manager()));
bool result = command_buffer_->Initialize();
« no previous file with comments | « gpu/gles2_conform_support/egl/display.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698