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

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

Issue 2651593002: mus: Remove the old client lib. (Closed)
Patch Set: restore test Created 3 years, 11 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 | « content/browser/compositor/mus_browser_compositor_output_surface.h ('k') | content/renderer/mus/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/mus_browser_compositor_output_surface.cc
diff --git a/content/browser/compositor/mus_browser_compositor_output_surface.cc b/content/browser/compositor/mus_browser_compositor_output_surface.cc
index 91b07fd0ba9ecccdc722bb8ad78f8a15caa6ce66..f6d07f03098c9067f5a14609bb65da60b26c857d 100644
--- a/content/browser/compositor/mus_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/mus_browser_compositor_output_surface.cc
@@ -14,8 +14,6 @@
#include "gpu/command_buffer/client/gles2_interface.h"
#include "gpu/ipc/client/command_buffer_proxy_impl.h"
#include "services/ui/public/cpp/gpu/context_provider_command_buffer.h"
-#include "services/ui/public/cpp/window.h"
-#include "services/ui/public/cpp/window_compositor_frame_sink.h"
#include "ui/aura/mus/window_compositor_frame_sink.h"
#include "ui/aura/mus/window_port_mus.h"
#include "ui/aura/window.h"
@@ -25,25 +23,6 @@
namespace content {
MusBrowserCompositorOutputSurface::MusBrowserCompositorOutputSurface(
- ui::Window* window,
- scoped_refptr<ui::ContextProviderCommandBuffer> context,
- gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
- const UpdateVSyncParametersCallback& update_vsync_parameters_callback,
- std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
- overlay_candidate_validator)
- : GpuBrowserCompositorOutputSurface(std::move(context),
- update_vsync_parameters_callback,
- std::move(overlay_candidate_validator),
- false /* support_stencil */),
- ui_window_(window),
- window_(nullptr),
- begin_frame_source_(nullptr) {
- ui_compositor_frame_sink_ = ui_window_->RequestCompositorFrameSink(
- context, gpu_memory_buffer_manager);
- ui_compositor_frame_sink_->BindToClient(this);
-}
-
-MusBrowserCompositorOutputSurface::MusBrowserCompositorOutputSurface(
aura::Window* window,
scoped_refptr<ui::ContextProviderCommandBuffer> context,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
@@ -54,7 +33,6 @@ MusBrowserCompositorOutputSurface::MusBrowserCompositorOutputSurface(
update_vsync_parameters_callback,
std::move(overlay_candidate_validator),
false /* support_stencil */),
- ui_window_(nullptr),
window_(window),
begin_frame_source_(nullptr) {
aura::WindowPortMus* window_port = aura::WindowPortMus::Get(window_);
@@ -80,9 +58,7 @@ void MusBrowserCompositorOutputSurface::SwapBuffers(
// Reset latency_info to known empty state after moving contents.
frame.latency_info.clear();
const int render_pass_id = 1;
- const gfx::Rect bounds_in_dip = ui_window_
- ? gfx::Rect(ui_window_->bounds().size())
- : gfx::Rect(window_->bounds().size());
+ const gfx::Rect bounds_in_dip = gfx::Rect(window_->bounds().size());
const gfx::Rect bounds_in_pixels = gfx::ConvertRectToPixel(
ui_frame.metadata.device_scale_factor, bounds_in_dip);
std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
@@ -144,13 +120,7 @@ void MusBrowserCompositorOutputSurface::SwapBuffers(
ui_frame.render_pass_list.push_back(std::move(pass));
- // TODO(mfomitchev): Remove ui_compositor_frame_sink_ once we complete the
- // switch to Aura-Mus.
- if (ui_compositor_frame_sink_)
- ui_compositor_frame_sink_->SubmitCompositorFrame(std::move(ui_frame));
- else
- compositor_frame_sink_->SubmitCompositorFrame(std::move(ui_frame));
- return;
+ compositor_frame_sink_->SubmitCompositorFrame(std::move(ui_frame));
}
void MusBrowserCompositorOutputSurface::SetBeginFrameSource(
« no previous file with comments | « content/browser/compositor/mus_browser_compositor_output_surface.h ('k') | content/renderer/mus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698