| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |