OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |