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

Unified Diff: content/gpu/in_process_gpu_thread.cc

Issue 1297953004: Support mojo applications in GPU process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 years, 2 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 | « content/gpu/gpu_process_control_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/in_process_gpu_thread.cc
diff --git a/content/gpu/in_process_gpu_thread.cc b/content/gpu/in_process_gpu_thread.cc
index bd9ef94fcf87a0a2cc6ebf01db857116ae1fc79c..10d0702e014b017bf72af5df0b9541a426fa12e7 100644
--- a/content/gpu/in_process_gpu_thread.cc
+++ b/content/gpu/in_process_gpu_thread.cc
@@ -4,6 +4,7 @@
#include "content/gpu/in_process_gpu_thread.h"
+#include "base/time/time.h"
#include "content/common/gpu/gpu_memory_buffer_factory.h"
#include "content/gpu/gpu_child_thread.h"
#include "content/gpu/gpu_process.h"
@@ -34,10 +35,17 @@ InProcessGpuThread::~InProcessGpuThread() {
void InProcessGpuThread::Init() {
gpu_process_ = new GpuProcess();
+
// The process object takes ownership of the thread object, so do not
// save and delete the pointer.
- gpu_process_->set_main_thread(new GpuChildThread(
- params_, gpu_memory_buffer_factory_.get(), sync_point_manager_override_));
+ GpuChildThread* child_thread = new GpuChildThread(
+ params_, gpu_memory_buffer_factory_.get(), sync_point_manager_override_);
+
+ // Since we are in the browser process, use the thread start time as the
+ // process start time.
+ child_thread->Init(base::Time::Now());
+
+ gpu_process_->set_main_thread(child_thread);
}
void InProcessGpuThread::CleanUp() {
« no previous file with comments | « content/gpu/gpu_process_control_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698