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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 2249413004: services/ui: Allow injecting the IO thread task runner for gpu channel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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 "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 630
631 lazy_tls.Pointer()->Set(this); 631 lazy_tls.Pointer()->Set(this);
632 632
633 // Register this object as the main thread. 633 // Register this object as the main thread.
634 ChildProcess::current()->set_main_thread(this); 634 ChildProcess::current()->set_main_thread(this);
635 635
636 #if defined(USE_AURA) 636 #if defined(USE_AURA)
637 if (IsRunningInMash()) { 637 if (IsRunningInMash()) {
638 gpu_service_ = 638 gpu_service_ =
639 ui::GpuService::Initialize(GetMojoShellConnection()->GetConnector()); 639 ui::GpuService::Initialize(GetMojoShellConnection()->GetConnector());
640 gpu_service_->SetIOThreadTaskRunner(
641 ChildProcess::current()->io_task_runner());
640 } 642 }
641 #endif 643 #endif
642 644
643 InitializeWebKit(resource_task_queue); 645 InitializeWebKit(resource_task_queue);
644 646
645 // In single process the single process is all there is. 647 // In single process the single process is all there is.
646 webkit_shared_timer_suspended_ = false; 648 webkit_shared_timer_suspended_ = false;
647 widget_count_ = 0; 649 widget_count_ = 0;
648 hidden_widget_count_ = 0; 650 hidden_widget_count_ = 0;
649 idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs; 651 idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs;
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) 2231 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical)
2230 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; 2232 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate;
2231 2233
2232 blink::mainThreadIsolate()->MemoryPressureNotification( 2234 blink::mainThreadIsolate()->MemoryPressureNotification(
2233 v8_memory_pressure_level); 2235 v8_memory_pressure_level);
2234 blink::MemoryPressureNotificationToWorkerThreadIsolates( 2236 blink::MemoryPressureNotificationToWorkerThreadIsolates(
2235 v8_memory_pressure_level); 2237 v8_memory_pressure_level);
2236 } 2238 }
2237 2239
2238 } // namespace content 2240 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698