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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 2464123003: Enabling Aura-Mus clients to submit frames to Mus. (Closed)
Patch Set: Rebase, addressing feedback, removing some unneded imports/deps. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/compositor/mus_browser_compositor_output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/gpu_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index 4b80fd590878d7ac6b541840b7a21107aa321db4..a14ecb7231505577a3dd174c86eba3dcf4e761f5 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -59,6 +59,7 @@
#if defined(USE_AURA)
#include "content/browser/compositor/mus_browser_compositor_output_surface.h"
#include "content/public/common/service_manager_connection.h"
+#include "ui/aura/window_tree_host.h"
#endif
#if defined(OS_WIN)
@@ -511,11 +512,24 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
begin_frame_source.get(), std::move(validator));
} else {
#if defined(USE_AURA)
- display_output_surface =
- base::MakeUnique<MusBrowserCompositorOutputSurface>(
- compositor->window(), context_provider,
- GetGpuMemoryBufferManager(), compositor->vsync_manager(),
- begin_frame_source.get(), std::move(validator));
+ if (compositor->window()) {
+ // TODO(mfomitchev): Remove this clause once we complete the switch
+ // to Aura-Mus.
+ display_output_surface =
+ base::MakeUnique<MusBrowserCompositorOutputSurface>(
+ compositor->window(), context_provider,
+ GetGpuMemoryBufferManager(), compositor->vsync_manager(),
+ begin_frame_source.get(), std::move(validator));
+ } else {
+ aura::WindowTreeHost* host =
+ aura::WindowTreeHost::GetForAcceleratedWidget(
+ compositor->widget());
+ display_output_surface =
+ base::MakeUnique<MusBrowserCompositorOutputSurface>(
+ host->window(), context_provider,
+ GetGpuMemoryBufferManager(), compositor->vsync_manager(),
+ begin_frame_source.get(), std::move(validator));
+ }
#else
NOTREACHED();
#endif
« no previous file with comments | « no previous file | content/browser/compositor/mus_browser_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698