| 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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner))); | 695 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner))); |
| 696 | 696 |
| 697 std::unique_ptr<cc::SurfaceDisplayOutputSurface> delegated_output_surface( | 697 std::unique_ptr<cc::SurfaceDisplayOutputSurface> delegated_output_surface( |
| 698 vulkan_context_provider ? new cc::SurfaceDisplayOutputSurface( | 698 vulkan_context_provider ? new cc::SurfaceDisplayOutputSurface( |
| 699 manager, surface_id_allocator_.get(), | 699 manager, surface_id_allocator_.get(), |
| 700 display_.get(), vulkan_context_provider) | 700 display_.get(), vulkan_context_provider) |
| 701 : new cc::SurfaceDisplayOutputSurface( | 701 : new cc::SurfaceDisplayOutputSurface( |
| 702 manager, surface_id_allocator_.get(), | 702 manager, surface_id_allocator_.get(), |
| 703 display_.get(), context_provider, nullptr)); | 703 display_.get(), context_provider, nullptr)); |
| 704 | 704 |
| 705 display_->SetVisible(true); |
| 705 display_->Resize(size_); | 706 display_->Resize(size_); |
| 706 host_->SetOutputSurface(std::move(delegated_output_surface)); | 707 host_->SetOutputSurface(std::move(delegated_output_surface)); |
| 707 } | 708 } |
| 708 | 709 |
| 709 void CompositorImpl::PopulateGpuCapabilities( | 710 void CompositorImpl::PopulateGpuCapabilities( |
| 710 gpu::Capabilities gpu_capabilities) { | 711 gpu::Capabilities gpu_capabilities) { |
| 711 gpu_capabilities_ = gpu_capabilities; | 712 gpu_capabilities_ = gpu_capabilities; |
| 712 } | 713 } |
| 713 | 714 |
| 714 void CompositorImpl::AddObserver(VSyncObserver* observer) { | 715 void CompositorImpl::AddObserver(VSyncObserver* observer) { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 | 794 |
| 794 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); | 795 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); |
| 795 host_->SetNeedsAnimate(); | 796 host_->SetNeedsAnimate(); |
| 796 } | 797 } |
| 797 | 798 |
| 798 bool CompositorImpl::HavePendingReadbacks() { | 799 bool CompositorImpl::HavePendingReadbacks() { |
| 799 return !readback_layer_tree_->children().empty(); | 800 return !readback_layer_tree_->children().empty(); |
| 800 } | 801 } |
| 801 | 802 |
| 802 } // namespace content | 803 } // namespace content |
| OLD | NEW |