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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 1031163002: content: Use background priority for raster thread in browser compositor on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | 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 (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/browser/renderer_host/compositor_impl_android.h" 5 #include "content/browser/renderer_host/compositor_impl_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 139
140 int g_surface_id_namespace = 0; 140 int g_surface_id_namespace = 0;
141 141
142 class SingleThreadTaskGraphRunner 142 class SingleThreadTaskGraphRunner
143 : public cc::TaskGraphRunner, 143 : public cc::TaskGraphRunner,
144 public base::DelegateSimpleThread::Delegate { 144 public base::DelegateSimpleThread::Delegate {
145 public: 145 public:
146 SingleThreadTaskGraphRunner() : worker_thread_(this, "CompositorWorker") { 146 SingleThreadTaskGraphRunner() : worker_thread_(this, "CompositorWorker") {
147 worker_thread_.Start(); 147 worker_thread_.Start();
148 worker_thread_.SetThreadPriority(base::kThreadPriority_Background);
148 } 149 }
149 150
150 ~SingleThreadTaskGraphRunner() override { 151 ~SingleThreadTaskGraphRunner() override {
151 Shutdown(); 152 Shutdown();
152 worker_thread_.Join(); 153 worker_thread_.Join();
153 } 154 }
154 155
155 private: 156 private:
156 // Overridden from base::DelegateSimpleThread::Delegate: 157 // Overridden from base::DelegateSimpleThread::Delegate:
157 void Run() override { cc::TaskGraphRunner::Run(); } 158 void Run() override { cc::TaskGraphRunner::Run(); }
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 721
721 void CompositorImpl::SetNeedsAnimate() { 722 void CompositorImpl::SetNeedsAnimate() {
722 needs_animate_ = true; 723 needs_animate_ = true;
723 if (!host_) 724 if (!host_)
724 return; 725 return;
725 726
726 host_->SetNeedsAnimate(); 727 host_->SetNeedsAnimate();
727 } 728 }
728 729
729 } // namespace content 730 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698