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

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

Issue 2547243002: Set device scale factor in CompositorFrame and scale frame size in WS. (Closed)
Patch Set: Created 4 years 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 begin_frame_source.get(), std::move(validator)); 512 begin_frame_source.get(), std::move(validator));
513 } else { 513 } else {
514 #if defined(USE_AURA) 514 #if defined(USE_AURA)
515 if (compositor->window()) { 515 if (compositor->window()) {
516 // TODO(mfomitchev): Remove this clause once we complete the switch 516 // TODO(mfomitchev): Remove this clause once we complete the switch
517 // to Aura-Mus. 517 // to Aura-Mus.
518 display_output_surface = 518 display_output_surface =
519 base::MakeUnique<MusBrowserCompositorOutputSurface>( 519 base::MakeUnique<MusBrowserCompositorOutputSurface>(
520 compositor->window(), context_provider, 520 compositor->window(), context_provider,
521 GetGpuMemoryBufferManager(), compositor->vsync_manager(), 521 GetGpuMemoryBufferManager(), compositor->vsync_manager(),
522 begin_frame_source.get(), std::move(validator)); 522 begin_frame_source.get(), std::move(validator),
523 compositor->device_scale_factor());
523 } else { 524 } else {
524 aura::WindowTreeHost* host = 525 aura::WindowTreeHost* host =
525 aura::WindowTreeHost::GetForAcceleratedWidget( 526 aura::WindowTreeHost::GetForAcceleratedWidget(
526 compositor->widget()); 527 compositor->widget());
527 display_output_surface = 528 display_output_surface =
528 base::MakeUnique<MusBrowserCompositorOutputSurface>( 529 base::MakeUnique<MusBrowserCompositorOutputSurface>(
529 host->window(), context_provider, 530 host->window(), context_provider,
530 GetGpuMemoryBufferManager(), compositor->vsync_manager(), 531 GetGpuMemoryBufferManager(), compositor->vsync_manager(),
531 begin_frame_source.get(), std::move(validator)); 532 begin_frame_source.get(), std::move(validator),
533 compositor->device_scale_factor());
532 } 534 }
533 #else 535 #else
534 NOTREACHED(); 536 NOTREACHED();
535 #endif 537 #endif
536 } 538 }
537 } 539 }
538 } 540 }
539 } 541 }
540 542
541 data->display_output_surface = display_output_surface.get(); 543 data->display_output_surface = display_output_surface.get();
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 shared_vulkan_context_provider_ = 883 shared_vulkan_context_provider_ =
882 cc::VulkanInProcessContextProvider::Create(); 884 cc::VulkanInProcessContextProvider::Create();
883 } 885 }
884 886
885 shared_vulkan_context_provider_initialized_ = true; 887 shared_vulkan_context_provider_initialized_ = true;
886 } 888 }
887 return shared_vulkan_context_provider_; 889 return shared_vulkan_context_provider_;
888 } 890 }
889 891
890 } // namespace content 892 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698