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

Unified Diff: content/renderer/gpu/compositor_output_surface.cc

Issue 1616953003: content: Improve thread priority for raster threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.h ('k') | content/renderer/raster_worker_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/compositor_output_surface.cc
diff --git a/content/renderer/gpu/compositor_output_surface.cc b/content/renderer/gpu/compositor_output_surface.cc
index 8210e688180eb9b161bfd0993e1aeda75503411d..ec64d44019a41eda508bd8a1de460233337ecc26 100644
--- a/content/renderer/gpu/compositor_output_surface.cc
+++ b/content/renderer/gpu/compositor_output_surface.cc
@@ -45,10 +45,6 @@ CompositorOutputSurface::CompositorOutputSurface(
->compositor_message_filter()),
frame_swap_message_queue_(swap_frame_message_queue),
routing_id_(routing_id),
-#if defined(OS_ANDROID)
- prefers_smoothness_(false),
- main_thread_runner_(base::MessageLoop::current()->task_runner()),
-#endif
layout_test_mode_(RenderThreadImpl::current()->layout_test_mode()),
weak_ptrs_(this) {
DCHECK(output_surface_filter_.get());
@@ -86,7 +82,6 @@ bool CompositorOutputSurface::BindToClient(
void CompositorOutputSurface::DetachFromClient() {
if (!HasClient())
return;
- UpdateSmoothnessTakesPriority(false);
if (output_surface_proxy_.get())
output_surface_proxy_->ClearOutputSurface();
output_surface_filter_->RemoveHandlerOnCompositorThread(
@@ -202,32 +197,4 @@ bool CompositorOutputSurface::Send(IPC::Message* message) {
return message_sender_->Send(message);
}
-#if defined(OS_ANDROID)
-namespace {
-void SetThreadPriorityToIdle() {
- base::PlatformThread::SetCurrentThreadPriority(
- base::ThreadPriority::BACKGROUND);
-}
-void SetThreadPriorityToDefault() {
- base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::NORMAL);
-}
-} // namespace
-#endif
-
-void CompositorOutputSurface::UpdateSmoothnessTakesPriority(
- bool prefers_smoothness) {
-#if defined(OS_ANDROID)
- if (prefers_smoothness_ == prefers_smoothness)
- return;
- prefers_smoothness_ = prefers_smoothness;
- if (prefers_smoothness) {
- main_thread_runner_->PostTask(FROM_HERE,
- base::Bind(&SetThreadPriorityToIdle));
- } else {
- main_thread_runner_->PostTask(FROM_HERE,
- base::Bind(&SetThreadPriorityToDefault));
- }
-#endif
-}
-
} // namespace content
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.h ('k') | content/renderer/raster_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698