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 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 | 666 |
667 cc::SurfaceManager* manager = GetSurfaceManager(); | 667 cc::SurfaceManager* manager = GetSurfaceManager(); |
668 if (manager) { | 668 if (manager) { |
669 display_client_.reset(new cc::OnscreenDisplayClient( | 669 display_client_.reset(new cc::OnscreenDisplayClient( |
670 real_output_surface.Pass(), manager, HostSharedBitmapManager::current(), | 670 real_output_surface.Pass(), manager, HostSharedBitmapManager::current(), |
671 BrowserGpuMemoryBufferManager::current(), | 671 BrowserGpuMemoryBufferManager::current(), |
672 host_->settings().renderer_settings, | 672 host_->settings().renderer_settings, |
673 base::ThreadTaskRunnerHandle::Get())); | 673 base::ThreadTaskRunnerHandle::Get())); |
674 scoped_ptr<cc::SurfaceDisplayOutputSurface> surface_output_surface( | 674 scoped_ptr<cc::SurfaceDisplayOutputSurface> surface_output_surface( |
675 new cc::SurfaceDisplayOutputSurface( | 675 new cc::SurfaceDisplayOutputSurface( |
676 manager, surface_id_allocator_.get(), context_provider, nullptr)); | 676 manager, surface_id_allocator_.get(), context_provider)); |
677 | 677 |
678 display_client_->set_surface_output_surface(surface_output_surface.get()); | 678 display_client_->set_surface_output_surface(surface_output_surface.get()); |
679 surface_output_surface->set_display_client(display_client_.get()); | 679 surface_output_surface->set_display_client(display_client_.get()); |
680 display_client_->display()->Resize(size_); | 680 display_client_->display()->Resize(size_); |
681 host_->SetOutputSurface(surface_output_surface.Pass()); | 681 host_->SetOutputSurface(surface_output_surface.Pass()); |
682 } else { | 682 } else { |
683 host_->SetOutputSurface(real_output_surface.Pass()); | 683 host_->SetOutputSurface(real_output_surface.Pass()); |
684 } | 684 } |
685 } | 685 } |
686 | 686 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 | 785 |
786 void CompositorImpl::SetNeedsAnimate() { | 786 void CompositorImpl::SetNeedsAnimate() { |
787 needs_animate_ = true; | 787 needs_animate_ = true; |
788 if (!host_) | 788 if (!host_) |
789 return; | 789 return; |
790 | 790 |
791 host_->SetNeedsAnimate(); | 791 host_->SetNeedsAnimate(); |
792 } | 792 } |
793 | 793 |
794 } // namespace content | 794 } // namespace content |
OLD | NEW |