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

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 2029323004: Get rid of virtual Display::CreateScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onscreendisplayclient
Patch Set: displaytest: androids Created 4 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/compositor/gpu_process_transport_factory.h" 5 #include "content/browser/compositor/gpu_process_transport_factory.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 data->display_output_surface = display_output_surface.get(); 482 data->display_output_surface = display_output_surface.get();
483 if (data->reflector) 483 if (data->reflector)
484 data->reflector->OnSourceSurfaceReady(data->display_output_surface); 484 data->reflector->OnSourceSurfaceReady(data->display_output_surface);
485 485
486 #if defined(OS_WIN) 486 #if defined(OS_WIN)
487 gfx::RenderingWindowManager::GetInstance()->DoSetParentOnChild( 487 gfx::RenderingWindowManager::GetInstance()->DoSetParentOnChild(
488 compositor->widget()); 488 compositor->widget());
489 #endif 489 #endif
490 490
491 // The Display owns and uses the |display_output_surface| created above. 491 // The Display owns and uses the |display_output_surface| created above.
492 auto* begin_frame_source = display_output_surface->GetBeginFrameSource();
492 data->display = base::MakeUnique<cc::Display>( 493 data->display = base::MakeUnique<cc::Display>(
493 surface_manager_.get(), HostSharedBitmapManager::current(), 494 surface_manager_.get(), HostSharedBitmapManager::current(),
494 BrowserGpuMemoryBufferManager::current(), 495 BrowserGpuMemoryBufferManager::current(),
495 compositor->GetRendererSettings(), 496 compositor->GetRendererSettings(),
496 compositor->surface_id_allocator()->id_namespace(), 497 compositor->surface_id_allocator()->id_namespace(),
497 compositor->task_runner().get(), std::move(display_output_surface)); 498 compositor->task_runner().get(), begin_frame_source,
499 std::move(display_output_surface));
498 500
499 // The |delegated_output_surface| is given back to the compositor, it 501 // The |delegated_output_surface| is given back to the compositor, it
500 // delegates to the Display as its root surface. Importantly, it shares the 502 // delegates to the Display as its root surface. Importantly, it shares the
501 // same ContextProvider as the Display's output surface. 503 // same ContextProvider as the Display's output surface.
502 std::unique_ptr<cc::SurfaceDisplayOutputSurface> delegated_output_surface( 504 std::unique_ptr<cc::SurfaceDisplayOutputSurface> delegated_output_surface(
503 vulkan_context_provider 505 vulkan_context_provider
504 ? new cc::SurfaceDisplayOutputSurface( 506 ? new cc::SurfaceDisplayOutputSurface(
505 surface_manager_.get(), compositor->surface_id_allocator(), 507 surface_manager_.get(), compositor->surface_id_allocator(),
506 data->display.get(), 508 data->display.get(),
507 static_cast<scoped_refptr<cc::VulkanContextProvider>>( 509 static_cast<scoped_refptr<cc::VulkanContextProvider>>(
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 shared_vulkan_context_provider_ = 781 shared_vulkan_context_provider_ =
780 cc::VulkanInProcessContextProvider::Create(); 782 cc::VulkanInProcessContextProvider::Create();
781 } 783 }
782 784
783 shared_vulkan_context_provider_initialized_ = true; 785 shared_vulkan_context_provider_initialized_ = true;
784 } 786 }
785 return shared_vulkan_context_provider_; 787 return shared_vulkan_context_provider_;
786 } 788 }
787 789
788 } // namespace content 790 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698