| 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 int g_surface_id_namespace = 0; | 139 int g_surface_id_namespace = 0; |
| 140 | 140 |
| 141 class SingleThreadTaskGraphRunner | 141 class SingleThreadTaskGraphRunner |
| 142 : public cc::TaskGraphRunner, | 142 : public cc::TaskGraphRunner, |
| 143 public base::DelegateSimpleThread::Delegate { | 143 public base::DelegateSimpleThread::Delegate { |
| 144 public: | 144 public: |
| 145 SingleThreadTaskGraphRunner() | 145 SingleThreadTaskGraphRunner() |
| 146 : worker_thread_( | 146 : worker_thread_( |
| 147 this, | 147 this, |
| 148 "CompositorTileWorker1", | 148 "CompositorTileWorker1", |
| 149 base::SimpleThread::Options(base::ThreadPriority::BACKGROUND)) { | 149 base::SimpleThread::Options(base::ThreadPriority::UI_BACKGROUND)) { |
| 150 worker_thread_.Start(); | 150 worker_thread_.Start(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 ~SingleThreadTaskGraphRunner() override { | 153 ~SingleThreadTaskGraphRunner() override { |
| 154 Shutdown(); | 154 Shutdown(); |
| 155 worker_thread_.Join(); | 155 worker_thread_.Join(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 private: | 158 private: |
| 159 // Overridden from base::DelegateSimpleThread::Delegate: | 159 // Overridden from base::DelegateSimpleThread::Delegate: |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 | 763 |
| 764 void CompositorImpl::SetNeedsAnimate() { | 764 void CompositorImpl::SetNeedsAnimate() { |
| 765 needs_animate_ = true; | 765 needs_animate_ = true; |
| 766 if (!host_) | 766 if (!host_) |
| 767 return; | 767 return; |
| 768 | 768 |
| 769 host_->SetNeedsAnimate(); | 769 host_->SetNeedsAnimate(); |
| 770 } | 770 } |
| 771 | 771 |
| 772 } // namespace content | 772 } // namespace content |
| OLD | NEW |