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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 static bool g_initialized = false; | 188 static bool g_initialized = false; |
189 | 189 |
190 base::LazyInstance<cc::SurfaceManager> g_surface_manager = | 190 base::LazyInstance<cc::SurfaceManager> g_surface_manager = |
191 LAZY_INSTANCE_INITIALIZER; | 191 LAZY_INSTANCE_INITIALIZER; |
192 | 192 |
193 int g_surface_id_namespace = 0; | 193 int g_surface_id_namespace = 0; |
194 | 194 |
195 class SingleThreadTaskGraphRunner : public cc::SingleThreadTaskGraphRunner { | 195 class SingleThreadTaskGraphRunner : public cc::SingleThreadTaskGraphRunner { |
196 public: | 196 public: |
197 SingleThreadTaskGraphRunner() { | 197 SingleThreadTaskGraphRunner() { |
198 Start("CompositorTileWorker1", | 198 Start("CompositorTileWorker1", base::SimpleThread::Options()); |
199 base::SimpleThread::Options(base::ThreadPriority::BACKGROUND)); | |
200 } | 199 } |
201 | 200 |
202 ~SingleThreadTaskGraphRunner() override { | 201 ~SingleThreadTaskGraphRunner() override { |
203 Shutdown(); | 202 Shutdown(); |
204 } | 203 } |
205 }; | 204 }; |
206 | 205 |
207 base::LazyInstance<SingleThreadTaskGraphRunner> g_task_graph_runner = | 206 base::LazyInstance<SingleThreadTaskGraphRunner> g_task_graph_runner = |
208 LAZY_INSTANCE_INITIALIZER; | 207 LAZY_INSTANCE_INITIALIZER; |
209 | 208 |
(...skipping 435 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 |