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, automatic_flushes, | 687 gpu::GpuStreamPriority::NORMAL, surface_handle_, url, |
688 support_locking, limits, attributes, nullptr, | 688 gl::PreferIntegratedGpu, automatic_flushes, support_locking, limits, |
| 689 attributes, nullptr, |
689 command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); | 690 command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); |
690 DCHECK(context_provider.get()); | 691 DCHECK(context_provider.get()); |
691 | 692 |
692 display_output_surface = base::WrapUnique(new OutputSurfaceWithoutParent( | 693 display_output_surface = base::WrapUnique(new OutputSurfaceWithoutParent( |
693 context_provider, base::Bind(&CompositorImpl::PopulateGpuCapabilities, | 694 context_provider, base::Bind(&CompositorImpl::PopulateGpuCapabilities, |
694 base::Unretained(this)))); | 695 base::Unretained(this)))); |
695 } | 696 } |
696 | 697 |
697 cc::SurfaceManager* manager = GetSurfaceManager(); | 698 cc::SurfaceManager* manager = GetSurfaceManager(); |
698 auto* task_runner = base::ThreadTaskRunnerHandle::Get().get(); | 699 auto* task_runner = base::ThreadTaskRunnerHandle::Get().get(); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 void CompositorImpl::SetNeedsAnimate() { | 804 void CompositorImpl::SetNeedsAnimate() { |
804 needs_animate_ = true; | 805 needs_animate_ = true; |
805 if (!host_->visible()) | 806 if (!host_->visible()) |
806 return; | 807 return; |
807 | 808 |
808 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); | 809 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); |
809 host_->SetNeedsAnimate(); | 810 host_->SetNeedsAnimate(); |
810 } | 811 } |
811 | 812 |
812 } // namespace content | 813 } // namespace content |
OLD | NEW |