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 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <utility> | 10 #include <utility> |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 static bool g_initialized = false; | 187 static bool g_initialized = false; |
188 | 188 |
189 base::LazyInstance<cc::SurfaceManager> g_surface_manager = | 189 base::LazyInstance<cc::SurfaceManager> g_surface_manager = |
190 LAZY_INSTANCE_INITIALIZER; | 190 LAZY_INSTANCE_INITIALIZER; |
191 | 191 |
192 int g_surface_id_namespace = 0; | 192 int g_surface_id_namespace = 0; |
193 | 193 |
194 class SingleThreadTaskGraphRunner : public cc::SingleThreadTaskGraphRunner { | 194 class SingleThreadTaskGraphRunner : public cc::SingleThreadTaskGraphRunner { |
195 public: | 195 public: |
196 SingleThreadTaskGraphRunner() { | 196 SingleThreadTaskGraphRunner() { |
197 Start("CompositorTileWorker1", | 197 Start("CompositorTileWorker1", base::SimpleThread::Options()); |
198 base::SimpleThread::Options(base::ThreadPriority::BACKGROUND)); | |
199 } | 198 } |
200 | 199 |
201 ~SingleThreadTaskGraphRunner() override { | 200 ~SingleThreadTaskGraphRunner() override { |
202 Shutdown(); | 201 Shutdown(); |
203 } | 202 } |
204 }; | 203 }; |
205 | 204 |
206 base::LazyInstance<SingleThreadTaskGraphRunner> g_task_graph_runner = | 205 base::LazyInstance<SingleThreadTaskGraphRunner> g_task_graph_runner = |
207 LAZY_INSTANCE_INITIALIZER; | 206 LAZY_INSTANCE_INITIALIZER; |
208 | 207 |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 | 644 |
646 void CompositorImpl::SetNeedsAnimate() { | 645 void CompositorImpl::SetNeedsAnimate() { |
647 needs_animate_ = true; | 646 needs_animate_ = true; |
648 if (!host_->visible()) | 647 if (!host_->visible()) |
649 return; | 648 return; |
650 | 649 |
651 host_->SetNeedsAnimate(); | 650 host_->SetNeedsAnimate(); |
652 } | 651 } |
653 | 652 |
654 } // namespace content | 653 } // namespace content |
OLD | NEW |