Chromium Code Reviews| 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 <unordered_set> | 10 #include <unordered_set> |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 gfx::NativeWindow root_window) { | 347 gfx::NativeWindow root_window) { |
| 348 return client ? new CompositorImpl(client, root_window) : NULL; | 348 return client ? new CompositorImpl(client, root_window) : NULL; |
| 349 } | 349 } |
| 350 | 350 |
| 351 // static | 351 // static |
| 352 void Compositor::Initialize() { | 352 void Compositor::Initialize() { |
| 353 DCHECK(!CompositorImpl::IsInitialized()); | 353 DCHECK(!CompositorImpl::IsInitialized()); |
| 354 g_initialized = true; | 354 g_initialized = true; |
| 355 } | 355 } |
| 356 | 356 |
| 357 gpu::GpuChannelEstablishFactory* Compositor::GetGpuChannelEstablishFactory() { | |
|
klausw
2017/03/05 01:49:54
Add // static comment
Khushal
2017/03/05 01:59:53
Done.
| |
| 358 return BrowserGpuChannelFactoryHost::instance(); | |
| 359 } | |
| 360 | |
| 357 // static | 361 // static |
| 358 cc::SurfaceManager* CompositorImpl::GetSurfaceManager() { | 362 cc::SurfaceManager* CompositorImpl::GetSurfaceManager() { |
| 359 return &g_compositor_dependencies.Get().surface_manager; | 363 return &g_compositor_dependencies.Get().surface_manager; |
| 360 } | 364 } |
| 361 | 365 |
| 362 // static | 366 // static |
| 363 cc::FrameSinkId CompositorImpl::AllocateFrameSinkId() { | 367 cc::FrameSinkId CompositorImpl::AllocateFrameSinkId() { |
| 364 return g_compositor_dependencies.Get() | 368 return g_compositor_dependencies.Get() |
| 365 .frame_sink_id_allocator.NextFrameSinkId(); | 369 .frame_sink_id_allocator.NextFrameSinkId(); |
| 366 } | 370 } |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 821 } | 825 } |
| 822 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, | 826 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, |
| 823 frame_sink_id); | 827 frame_sink_id); |
| 824 } | 828 } |
| 825 | 829 |
| 826 bool CompositorImpl::HavePendingReadbacks() { | 830 bool CompositorImpl::HavePendingReadbacks() { |
| 827 return !readback_layer_tree_->children().empty(); | 831 return !readback_layer_tree_->children().empty(); |
| 828 } | 832 } |
| 829 | 833 |
| 830 } // namespace content | 834 } // namespace content |
| OLD | NEW |