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

Unified Diff: components/frame_sinks/display_compositor.cc

Issue 2768563002: Move DisplayCompositor code to new component. (Closed)
Patch Set: Rebase. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/frame_sinks/display_compositor.h ('k') | components/frame_sinks/frame_sinks_export.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/frame_sinks/display_compositor.cc
diff --git a/services/ui/surfaces/display_compositor.cc b/components/frame_sinks/display_compositor.cc
similarity index 92%
rename from services/ui/surfaces/display_compositor.cc
rename to components/frame_sinks/display_compositor.cc
index 9e10fde5f93468a152eb41e94ffa647cffea0592..be904d8c8ffff753b5b8f13569b425663a9791a7 100644
--- a/services/ui/surfaces/display_compositor.cc
+++ b/components/frame_sinks/display_compositor.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "services/ui/surfaces/display_compositor.h"
+#include "components/frame_sinks/display_compositor.h"
#include <utility>
@@ -15,8 +15,8 @@
#include "cc/surfaces/display.h"
#include "cc/surfaces/display_scheduler.h"
#include "cc/surfaces/surface.h"
-#include "components/display_compositor/gpu_compositor_frame_sink.h"
-#include "components/display_compositor/gpu_root_compositor_frame_sink.h"
+#include "components/frame_sinks/gpu_compositor_frame_sink.h"
+#include "components/frame_sinks/gpu_root_compositor_frame_sink.h"
#include "gpu/command_buffer/client/shared_memory_limits.h"
#include "gpu/ipc/gpu_in_process_thread_service.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
@@ -27,7 +27,7 @@
#include "services/ui/surfaces/display_output_surface_ozone.h"
#endif
-namespace ui {
+namespace frame_sinks {
DisplayCompositor::DisplayCompositor(
scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service,
@@ -78,7 +78,7 @@ void DisplayCompositor::CreateRootCompositorFrameSink(
}
compositor_frame_sinks_[frame_sink_id] =
- base::MakeUnique<display_compositor::GpuRootCompositorFrameSink>(
+ base::MakeUnique<GpuRootCompositorFrameSink>(
this, &manager_, frame_sink_id, std::move(display),
std::move(begin_frame_source), std::move(request),
std::move(private_request), std::move(client),
@@ -94,7 +94,7 @@ void DisplayCompositor::CreateCompositorFrameSink(
DCHECK_EQ(0u, compositor_frame_sinks_.count(frame_sink_id));
compositor_frame_sinks_[frame_sink_id] =
- base::MakeUnique<display_compositor::GpuCompositorFrameSink>(
+ base::MakeUnique<GpuCompositorFrameSink>(
this, &manager_, frame_sink_id, std::move(request),
std::move(private_request), std::move(client));
}
@@ -134,15 +134,14 @@ std::unique_ptr<cc::Display> DisplayCompositor::CreateDisplay(
std::unique_ptr<cc::OutputSurface> display_output_surface;
if (context_provider->ContextCapabilities().surfaceless) {
#if defined(USE_OZONE)
- display_output_surface = base::MakeUnique<DisplayOutputSurfaceOzone>(
- std::move(context_provider), surface_handle,
- begin_frame_source, gpu_memory_buffer_manager_.get(),
- GL_TEXTURE_2D, GL_RGB);
+ display_output_surface = base::MakeUnique<ui::DisplayOutputSurfaceOzone>(
+ std::move(context_provider), surface_handle, begin_frame_source,
+ gpu_memory_buffer_manager_.get(), GL_TEXTURE_2D, GL_RGB);
#else
NOTREACHED();
#endif
} else {
- display_output_surface = base::MakeUnique<DisplayOutputSurface>(
+ display_output_surface = base::MakeUnique<ui::DisplayOutputSurface>(
std::move(context_provider), begin_frame_source);
}
@@ -204,4 +203,4 @@ void DisplayCompositor::OnPrivateConnectionLost(
DestroyCompositorFrameSink(frame_sink_id);
}
-} // namespace ui
+} // namespace frame_sinks
« no previous file with comments | « components/frame_sinks/display_compositor.h ('k') | components/frame_sinks/frame_sinks_export.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698