Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 2144393003: cc: Allow TestDelegatingOutputSurface to be used for non-pixel tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 694
695 cc::SurfaceManager* manager = GetSurfaceManager(); 695 cc::SurfaceManager* manager = GetSurfaceManager();
696 auto* task_runner = base::ThreadTaskRunnerHandle::Get().get(); 696 auto* task_runner = base::ThreadTaskRunnerHandle::Get().get();
697 std::unique_ptr<ExternalBeginFrameSource> begin_frame_source( 697 std::unique_ptr<ExternalBeginFrameSource> begin_frame_source(
698 new ExternalBeginFrameSource(this)); 698 new ExternalBeginFrameSource(this));
699 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler( 699 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler(
700 begin_frame_source.get(), task_runner, 700 begin_frame_source.get(), task_runner,
701 display_output_surface->capabilities().max_frames_pending)); 701 display_output_surface->capabilities().max_frames_pending));
702 702
703 display_.reset(new cc::Display( 703 display_.reset(new cc::Display(
704 manager, HostSharedBitmapManager::current(), 704 HostSharedBitmapManager::current(),
705 BrowserGpuMemoryBufferManager::current(), 705 BrowserGpuMemoryBufferManager::current(),
706 host_->settings().renderer_settings, surface_id_allocator_->client_id(), 706 host_->settings().renderer_settings, std::move(begin_frame_source),
707 std::move(begin_frame_source), std::move(display_output_surface), 707 std::move(display_output_surface), std::move(scheduler),
708 std::move(scheduler),
709 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner))); 708 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner)));
710 709
711 std::unique_ptr<cc::SurfaceDisplayOutputSurface> delegated_output_surface( 710 std::unique_ptr<cc::SurfaceDisplayOutputSurface> delegated_output_surface(
712 vulkan_context_provider 711 vulkan_context_provider
713 ? new cc::SurfaceDisplayOutputSurface( 712 ? new cc::SurfaceDisplayOutputSurface(
714 manager, surface_id_allocator_.get(), display_.get(), 713 manager, surface_id_allocator_.get(), display_.get(),
715 static_cast<scoped_refptr<cc::VulkanContextProvider>>( 714 static_cast<scoped_refptr<cc::VulkanContextProvider>>(
716 vulkan_context_provider)) 715 vulkan_context_provider))
717 : new cc::SurfaceDisplayOutputSurface( 716 : new cc::SurfaceDisplayOutputSurface(
718 manager, surface_id_allocator_.get(), display_.get(), 717 manager, surface_id_allocator_.get(), display_.get(),
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 void CompositorImpl::SetNeedsAnimate() { 800 void CompositorImpl::SetNeedsAnimate() {
802 needs_animate_ = true; 801 needs_animate_ = true;
803 if (!host_->visible()) 802 if (!host_->visible())
804 return; 803 return;
805 804
806 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); 805 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate");
807 host_->SetNeedsAnimate(); 806 host_->SetNeedsAnimate();
808 } 807 }
809 808
810 } // namespace content 809 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698