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 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 "Worker1", |
149 base::SimpleThread::Options(base::ThreadPriority::BACKGROUND)) { | 149 base::SimpleThread::Options(base::ThreadPriority::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: |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 | 760 |
761 void CompositorImpl::SetNeedsAnimate() { | 761 void CompositorImpl::SetNeedsAnimate() { |
762 needs_animate_ = true; | 762 needs_animate_ = true; |
763 if (!host_) | 763 if (!host_) |
764 return; | 764 return; |
765 | 765 |
766 host_->SetNeedsAnimate(); | 766 host_->SetNeedsAnimate(); |
767 } | 767 } |
768 | 768 |
769 } // namespace content | 769 } // namespace content |
OLD | NEW |