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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 // any excess space. | 677 // any excess space. |
678 limits.start_transfer_buffer_size = 64 * 1024; | 678 limits.start_transfer_buffer_size = 64 * 1024; |
679 limits.min_transfer_buffer_size = 64 * 1024; | 679 limits.min_transfer_buffer_size = 64 * 1024; |
680 limits.max_transfer_buffer_size = full_screen_texture_size_in_bytes; | 680 limits.max_transfer_buffer_size = full_screen_texture_size_in_bytes; |
681 // Texture uploads may use mapped memory so give a reasonable limit for | 681 // Texture uploads may use mapped memory so give a reasonable limit for |
682 // them. | 682 // them. |
683 limits.mapped_memory_reclaim_limit = full_screen_texture_size_in_bytes; | 683 limits.mapped_memory_reclaim_limit = full_screen_texture_size_in_bytes; |
684 | 684 |
685 context_provider = new ContextProviderCommandBuffer( | 685 context_provider = new ContextProviderCommandBuffer( |
686 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, | 686 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, |
687 gpu::GpuStreamPriority::NORMAL, surface_handle_, url, | 687 gpu::GpuStreamPriority::NORMAL, surface_handle_, url, automatic_flushes, |
688 gl::PreferIntegratedGpu, automatic_flushes, support_locking, limits, | 688 support_locking, limits, attributes, nullptr, |
689 attributes, nullptr, | |
690 command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); | 689 command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); |
691 DCHECK(context_provider.get()); | 690 DCHECK(context_provider.get()); |
692 | 691 |
693 display_output_surface = base::WrapUnique(new OutputSurfaceWithoutParent( | 692 display_output_surface = base::WrapUnique(new OutputSurfaceWithoutParent( |
694 context_provider, base::Bind(&CompositorImpl::PopulateGpuCapabilities, | 693 context_provider, base::Bind(&CompositorImpl::PopulateGpuCapabilities, |
695 base::Unretained(this)))); | 694 base::Unretained(this)))); |
696 } | 695 } |
697 | 696 |
698 cc::SurfaceManager* manager = GetSurfaceManager(); | 697 cc::SurfaceManager* manager = GetSurfaceManager(); |
699 auto* task_runner = base::ThreadTaskRunnerHandle::Get().get(); | 698 auto* task_runner = base::ThreadTaskRunnerHandle::Get().get(); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 void CompositorImpl::SetNeedsAnimate() { | 803 void CompositorImpl::SetNeedsAnimate() { |
805 needs_animate_ = true; | 804 needs_animate_ = true; |
806 if (!host_->visible()) | 805 if (!host_->visible()) |
807 return; | 806 return; |
808 | 807 |
809 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); | 808 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); |
810 host_->SetNeedsAnimate(); | 809 host_->SetNeedsAnimate(); |
811 } | 810 } |
812 | 811 |
813 } // namespace content | 812 } // namespace content |
OLD | NEW |