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