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

Side by Side Diff: services/gles2/command_buffer_driver.cc

Issue 885693005: Turn off bind_generates_resource in Mojo's GL (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « mojo/cc/context_provider_mojo.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "services/gles2/command_buffer_driver.h" 5 #include "services/gles2/command_buffer_driver.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "gpu/command_buffer/common/constants.h" 10 #include "gpu/command_buffer/common/constants.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 if (!context_->MakeCurrent(surface_.get())) 120 if (!context_->MakeCurrent(surface_.get()))
121 return false; 121 return false;
122 122
123 // TODO(piman): ShaderTranslatorCache is currently per-ContextGroup but 123 // TODO(piman): ShaderTranslatorCache is currently per-ContextGroup but
124 // only needs to be per-thread. 124 // only needs to be per-thread.
125 scoped_refptr<gpu::gles2::ContextGroup> context_group = 125 scoped_refptr<gpu::gles2::ContextGroup> context_group =
126 new gpu::gles2::ContextGroup(mailbox_manager_.get(), 126 new gpu::gles2::ContextGroup(mailbox_manager_.get(),
127 new MemoryTrackerStub, 127 new MemoryTrackerStub,
128 new gpu::gles2::ShaderTranslatorCache, 128 new gpu::gles2::ShaderTranslatorCache,
129 nullptr, nullptr, nullptr, true); 129 nullptr, nullptr, nullptr, false);
jamesr 2015/01/28 23:41:53 can you extract this out into a const bool local s
abarth-chromium 2015/01/28 23:42:51 Sure/
130 130
131 command_buffer_.reset( 131 command_buffer_.reset(
132 new gpu::CommandBufferService(context_group->transfer_buffer_manager())); 132 new gpu::CommandBufferService(context_group->transfer_buffer_manager()));
133 bool result = command_buffer_->Initialize(); 133 bool result = command_buffer_->Initialize();
134 DCHECK(result); 134 DCHECK(result);
135 135
136 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group.get())); 136 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group.get()));
137 scheduler_.reset(new gpu::GpuScheduler(command_buffer_.get(), decoder_.get(), 137 scheduler_.reset(new gpu::GpuScheduler(command_buffer_.get(), decoder_.get(),
138 decoder_.get())); 138 decoder_.get()));
139 decoder_->set_engine(scheduler_.get()); 139 decoder_->set_engine(scheduler_.get());
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 client_->LostContext(reason); 240 client_->LostContext(reason);
241 } 241 }
242 242
243 void CommandBufferDriver::OnUpdateVSyncParameters( 243 void CommandBufferDriver::OnUpdateVSyncParameters(
244 const base::TimeTicks timebase, 244 const base::TimeTicks timebase,
245 const base::TimeDelta interval) { 245 const base::TimeDelta interval) {
246 client_->UpdateVSyncParameters(timebase, interval); 246 client_->UpdateVSyncParameters(timebase, interval);
247 } 247 }
248 248
249 } // namespace gles2 249 } // namespace gles2
OLDNEW
« no previous file with comments | « mojo/cc/context_provider_mojo.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698