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

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

Issue 1051863003: Turn ThreadPriority enum into an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setthreadpri
Patch Set: nits 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 | « content/browser/browser_main_loop.cc ('k') | content/child/child_process.cc » ('j') | 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() 146 SingleThreadTaskGraphRunner()
147 : worker_thread_(this, "CompositorTileWorker1") { 147 : worker_thread_(this, "CompositorTileWorker1") {
148 worker_thread_.Start(); 148 worker_thread_.Start();
149 worker_thread_.SetThreadPriority(base::kThreadPriority_Background); 149 worker_thread_.SetThreadPriority(base::ThreadPriority::BACKGROUND);
150 } 150 }
151 151
152 ~SingleThreadTaskGraphRunner() override { 152 ~SingleThreadTaskGraphRunner() override {
153 Shutdown(); 153 Shutdown();
154 worker_thread_.Join(); 154 worker_thread_.Join();
155 } 155 }
156 156
157 private: 157 private:
158 // Overridden from base::DelegateSimpleThread::Delegate: 158 // Overridden from base::DelegateSimpleThread::Delegate:
159 void Run() override { cc::TaskGraphRunner::Run(); } 159 void Run() override { cc::TaskGraphRunner::Run(); }
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 723
724 void CompositorImpl::SetNeedsAnimate() { 724 void CompositorImpl::SetNeedsAnimate() {
725 needs_animate_ = true; 725 needs_animate_ = true;
726 if (!host_) 726 if (!host_)
727 return; 727 return;
728 728
729 host_->SetNeedsAnimate(); 729 host_->SetNeedsAnimate();
730 } 730 }
731 731
732 } // namespace content 732 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/child/child_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698