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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 // any excess space. | 565 // any excess space. |
566 limits.start_transfer_buffer_size = 64 * 1024; | 566 limits.start_transfer_buffer_size = 64 * 1024; |
567 limits.min_transfer_buffer_size = 64 * 1024; | 567 limits.min_transfer_buffer_size = 64 * 1024; |
568 limits.max_transfer_buffer_size = full_screen_texture_size_in_bytes; | 568 limits.max_transfer_buffer_size = full_screen_texture_size_in_bytes; |
569 // Texture uploads may use mapped memory so give a reasonable limit for them. | 569 // Texture uploads may use mapped memory so give a reasonable limit for them. |
570 limits.mapped_memory_reclaim_limit = full_screen_texture_size_in_bytes; | 570 limits.mapped_memory_reclaim_limit = full_screen_texture_size_in_bytes; |
571 | 571 |
572 scoped_refptr<ContextProviderCommandBuffer> context_provider( | 572 scoped_refptr<ContextProviderCommandBuffer> context_provider( |
573 new ContextProviderCommandBuffer( | 573 new ContextProviderCommandBuffer( |
574 base::WrapUnique(new WebGraphicsContext3DCommandBufferImpl( | 574 base::WrapUnique(new WebGraphicsContext3DCommandBufferImpl( |
575 surface_handle_, url, gpu_channel_host.get(), attributes, | 575 surface_handle_, url, gpu_channel_host.get(), |
576 gfx::PreferIntegratedGpu, automatic_flushes)), | 576 gfx::PreferIntegratedGpu, automatic_flushes)), |
577 limits, nullptr, DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT)); | 577 limits, attributes, nullptr, |
| 578 command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT)); |
578 DCHECK(context_provider.get()); | 579 DCHECK(context_provider.get()); |
579 | 580 |
580 std::unique_ptr<cc::OutputSurface> real_output_surface( | 581 std::unique_ptr<cc::OutputSurface> real_output_surface( |
581 new OutputSurfaceWithoutParent( | 582 new OutputSurfaceWithoutParent( |
582 this, context_provider, | 583 this, context_provider, |
583 base::Bind(&CompositorImpl::PopulateGpuCapabilities, | 584 base::Bind(&CompositorImpl::PopulateGpuCapabilities, |
584 base::Unretained(this)), | 585 base::Unretained(this)), |
585 base::WrapUnique(new ExternalBeginFrameSource(this)))); | 586 base::WrapUnique(new ExternalBeginFrameSource(this)))); |
586 | 587 |
587 cc::SurfaceManager* manager = GetSurfaceManager(); | 588 cc::SurfaceManager* manager = GetSurfaceManager(); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 void CompositorImpl::SetNeedsAnimate() { | 681 void CompositorImpl::SetNeedsAnimate() { |
681 needs_animate_ = true; | 682 needs_animate_ = true; |
682 if (!host_->visible()) | 683 if (!host_->visible()) |
683 return; | 684 return; |
684 | 685 |
685 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); | 686 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); |
686 host_->SetNeedsAnimate(); | 687 host_->SetNeedsAnimate(); |
687 } | 688 } |
688 | 689 |
689 } // namespace content | 690 } // namespace content |
OLD | NEW |