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

Unified Diff: components/mus/ws/platform_display.cc

Issue 2098953003: Make cc::CompositorFrames movable [Part 2 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed exo unittests Created 4 years, 6 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/mus/ws/platform_display.h ('k') | components/mus/ws/server_window_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/platform_display.cc
diff --git a/components/mus/ws/platform_display.cc b/components/mus/ws/platform_display.cc
index a1bdf0f90ab076a07160dfce53abb0e3b3dc05ad..08ac5372a4c72b1f1d7d5892965ce3cfb471c499 100644
--- a/components/mus/ws/platform_display.cc
+++ b/components/mus/ws/platform_display.cc
@@ -257,7 +257,7 @@ void DefaultPlatformDisplay::Draw() {
return;
// TODO(fsamuel): We should add a trace for generating a top level frame.
- std::unique_ptr<cc::CompositorFrame> frame(GenerateCompositorFrame());
+ cc::CompositorFrame frame(GenerateCompositorFrame());
frame_pending_ = true;
if (display_compositor_) {
display_compositor_->SubmitCompositorFrame(
@@ -306,8 +306,7 @@ void DefaultPlatformDisplay::UpdateMetrics(const gfx::Size& size,
delegate_->OnViewportMetricsChanged(old_metrics, metrics_);
}
-std::unique_ptr<cc::CompositorFrame>
-DefaultPlatformDisplay::GenerateCompositorFrame() {
+cc::CompositorFrame DefaultPlatformDisplay::GenerateCompositorFrame() {
std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create();
render_pass->damage_rect = dirty_rect_;
render_pass->output_rect = gfx::Rect(metrics_.size_in_pixels);
@@ -320,8 +319,8 @@ DefaultPlatformDisplay::GenerateCompositorFrame() {
frame_data->device_scale_factor = metrics_.device_scale_factor;
frame_data->render_pass_list.push_back(std::move(render_pass));
- std::unique_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
- frame->delegated_frame_data = std::move(frame_data);
+ cc::CompositorFrame frame;
+ frame.delegated_frame_data = std::move(frame_data);
return frame;
}
« no previous file with comments | « components/mus/ws/platform_display.h ('k') | components/mus/ws/server_window_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698