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

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

Issue 2764633003: Fixing Display Mirror Mode issue (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 DCHECK(begin_frame_source); 564 DCHECK(begin_frame_source);
565 display_output_surface = std::move(mus_output_surface); 565 display_output_surface = std::move(mus_output_surface);
566 #else 566 #else
567 NOTREACHED(); 567 NOTREACHED();
568 #endif 568 #endif
569 } 569 }
570 } 570 }
571 } 571 }
572 } 572 }
573 573
574 data->display_output_surface = display_output_surface.get();
575 if (data->reflector)
576 data->reflector->OnSourceSurfaceReady(data->display_output_surface);
577
574 std::unique_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source; 578 std::unique_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source;
575 std::unique_ptr<GpuVSyncBeginFrameSource> gpu_vsync_begin_frame_source; 579 std::unique_ptr<GpuVSyncBeginFrameSource> gpu_vsync_begin_frame_source;
576 580
577 if (!begin_frame_source) { 581 if (!begin_frame_source) {
578 if (!compositor->GetRendererSettings().disable_display_vsync) { 582 if (!compositor->GetRendererSettings().disable_display_vsync) {
579 if (gpu_vsync_control && IsGpuVSyncSignalSupported()) { 583 if (gpu_vsync_control && IsGpuVSyncSignalSupported()) {
580 gpu_vsync_begin_frame_source = 584 gpu_vsync_begin_frame_source =
581 base::MakeUnique<GpuVSyncBeginFrameSource>(gpu_vsync_control); 585 base::MakeUnique<GpuVSyncBeginFrameSource>(gpu_vsync_control);
582 begin_frame_source = gpu_vsync_begin_frame_source.get(); 586 begin_frame_source = gpu_vsync_begin_frame_source.get();
583 } else { 587 } else {
584 synthetic_begin_frame_source = 588 synthetic_begin_frame_source =
585 base::MakeUnique<cc::DelayBasedBeginFrameSource>( 589 base::MakeUnique<cc::DelayBasedBeginFrameSource>(
586 base::MakeUnique<cc::DelayBasedTimeSource>( 590 base::MakeUnique<cc::DelayBasedTimeSource>(
587 compositor->task_runner().get())); 591 compositor->task_runner().get()));
588 begin_frame_source = synthetic_begin_frame_source.get(); 592 begin_frame_source = synthetic_begin_frame_source.get();
589 } 593 }
590 } else { 594 } else {
591 synthetic_begin_frame_source = 595 synthetic_begin_frame_source =
592 base::MakeUnique<cc::BackToBackBeginFrameSource>( 596 base::MakeUnique<cc::BackToBackBeginFrameSource>(
593 base::MakeUnique<cc::DelayBasedTimeSource>( 597 base::MakeUnique<cc::DelayBasedTimeSource>(
594 compositor->task_runner().get())); 598 compositor->task_runner().get()));
595 begin_frame_source = synthetic_begin_frame_source.get(); 599 begin_frame_source = synthetic_begin_frame_source.get();
596 } 600 }
597 } 601 }
598 602
599 if (data->reflector)
600 data->reflector->OnSourceSurfaceReady(data->display_output_surface);
601
602 #if defined(OS_WIN) 603 #if defined(OS_WIN)
603 gfx::RenderingWindowManager::GetInstance()->DoSetParentOnChild( 604 gfx::RenderingWindowManager::GetInstance()->DoSetParentOnChild(
604 compositor->widget()); 605 compositor->widget());
605 #endif 606 #endif
606 607
607 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler( 608 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler(
608 compositor->task_runner().get(), 609 compositor->task_runner().get(),
609 display_output_surface->capabilities().max_frames_pending)); 610 display_output_surface->capabilities().max_frames_pending));
610 611
611 // The Display owns and uses the |display_output_surface| created above. 612 // The Display owns and uses the |display_output_surface| created above.
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 shared_vulkan_context_provider_ = 953 shared_vulkan_context_provider_ =
953 cc::VulkanInProcessContextProvider::Create(); 954 cc::VulkanInProcessContextProvider::Create();
954 } 955 }
955 956
956 shared_vulkan_context_provider_initialized_ = true; 957 shared_vulkan_context_provider_initialized_ = true;
957 } 958 }
958 return shared_vulkan_context_provider_; 959 return shared_vulkan_context_provider_;
959 } 960 }
960 961
961 } // namespace content 962 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698