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

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 11 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
Index: gpu/command_buffer/service/in_process_command_buffer.cc
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc
index c67107392638a82d6f75c1030ab2fbf61d11f001..7a6556b8e617b59e432e383b9f3d52f041ddc933 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -101,8 +101,9 @@ void GpuInProcessThread::ScheduleTask(const base::Closure& task) {
}
void GpuInProcessThread::ScheduleIdleWork(const base::Closure& callback) {
+ // Match delay with GpuCommandBufferStub.
message_loop()->PostDelayedTask(
- FROM_HERE, callback, base::TimeDelta::FromMilliseconds(5));
+ FROM_HERE, callback, base::TimeDelta::FromMilliseconds(2));
}
scoped_refptr<gles2::ShaderTranslatorCache>
@@ -238,6 +239,13 @@ InProcessCommandBuffer::Service::Service() {}
InProcessCommandBuffer::Service::~Service() {}
+scoped_refptr<gfx::GLShareGroup>
+InProcessCommandBuffer::Service::share_group() {
+ if (!share_group_.get())
+ share_group_ = new gfx::GLShareGroup;
+ return share_group_;
+}
+
scoped_refptr<gles2::MailboxManager>
InProcessCommandBuffer::Service::mailbox_manager() {
if (!mailbox_manager_.get()) {
@@ -397,8 +405,8 @@ bool InProcessCommandBuffer::InitializeOnGpuThread(
}
gl_share_group_ = params.context_group
- ? params.context_group->gl_share_group_.get()
- : new gfx::GLShareGroup;
+ ? params.context_group->gl_share_group_
+ : service_->share_group();
#if defined(OS_ANDROID)
stream_texture_manager_.reset(new StreamTextureManagerInProcess);
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698