| 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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 // These limits are meant to hold the uploads for the browser UI without | 657 // These limits are meant to hold the uploads for the browser UI without |
| 658 // any excess space. | 658 // any excess space. |
| 659 limits.start_transfer_buffer_size = 64 * 1024; | 659 limits.start_transfer_buffer_size = 64 * 1024; |
| 660 limits.min_transfer_buffer_size = 64 * 1024; | 660 limits.min_transfer_buffer_size = 64 * 1024; |
| 661 limits.max_transfer_buffer_size = full_screen_texture_size_in_bytes; | 661 limits.max_transfer_buffer_size = full_screen_texture_size_in_bytes; |
| 662 // Texture uploads may use mapped memory so give a reasonable limit for | 662 // Texture uploads may use mapped memory so give a reasonable limit for |
| 663 // them. | 663 // them. |
| 664 limits.mapped_memory_reclaim_limit = full_screen_texture_size_in_bytes; | 664 limits.mapped_memory_reclaim_limit = full_screen_texture_size_in_bytes; |
| 665 | 665 |
| 666 context_provider = new ContextProviderCommandBuffer( | 666 context_provider = new ContextProviderCommandBuffer( |
| 667 std::move(gpu_channel_host), surface_handle_, url, | 667 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, |
| 668 gpu::GpuStreamPriority::NORMAL, surface_handle_, url, |
| 668 gfx::PreferIntegratedGpu, automatic_flushes, limits, attributes, | 669 gfx::PreferIntegratedGpu, automatic_flushes, limits, attributes, |
| 669 nullptr, command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); | 670 nullptr, command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); |
| 670 DCHECK(context_provider.get()); | 671 DCHECK(context_provider.get()); |
| 671 | 672 |
| 672 real_output_surface = base::WrapUnique(new OutputSurfaceWithoutParent( | 673 real_output_surface = base::WrapUnique(new OutputSurfaceWithoutParent( |
| 673 this, context_provider, | 674 this, context_provider, |
| 674 base::Bind(&CompositorImpl::PopulateGpuCapabilities, | 675 base::Bind(&CompositorImpl::PopulateGpuCapabilities, |
| 675 base::Unretained(this)), | 676 base::Unretained(this)), |
| 676 base::WrapUnique(new ExternalBeginFrameSource(this)))); | 677 base::WrapUnique(new ExternalBeginFrameSource(this)))); |
| 677 } | 678 } |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 void CompositorImpl::SetNeedsAnimate() { | 780 void CompositorImpl::SetNeedsAnimate() { |
| 780 needs_animate_ = true; | 781 needs_animate_ = true; |
| 781 if (!host_->visible()) | 782 if (!host_->visible()) |
| 782 return; | 783 return; |
| 783 | 784 |
| 784 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); | 785 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); |
| 785 host_->SetNeedsAnimate(); | 786 host_->SetNeedsAnimate(); |
| 786 } | 787 } |
| 787 | 788 |
| 788 } // namespace content | 789 } // namespace content |
| OLD | NEW |