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

Side by Side Diff: components/mus/ws/platform_display.cc

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix reflector 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 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 "components/mus/ws/platform_display.h" 5 #include "components/mus/ws/platform_display.h"
6 6
7 #include "base/numerics/safe_conversions.h" 7 #include "base/numerics/safe_conversions.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "cc/ipc/quads.mojom.h" 9 #include "cc/ipc/quads.mojom.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 render_pass->output_rect = gfx::Rect(metrics_.size_in_pixels); 315 render_pass->output_rect = gfx::Rect(metrics_.size_in_pixels);
316 316
317 DrawWindowTree(render_pass.get(), delegate_->GetRootWindow(), gfx::Vector2d(), 317 DrawWindowTree(render_pass.get(), delegate_->GetRootWindow(), gfx::Vector2d(),
318 1.0f); 318 1.0f);
319 319
320 std::unique_ptr<cc::DelegatedFrameData> frame_data( 320 std::unique_ptr<cc::DelegatedFrameData> frame_data(
321 new cc::DelegatedFrameData); 321 new cc::DelegatedFrameData);
322 frame_data->device_scale_factor = metrics_.device_scale_factor; 322 frame_data->device_scale_factor = metrics_.device_scale_factor;
323 frame_data->render_pass_list.push_back(std::move(render_pass)); 323 frame_data->render_pass_list.push_back(std::move(render_pass));
324 324
325 std::unique_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); 325 std::unique_ptr<cc::CompositorFrame> frame(cc::CompositorFrame::Create());
326 frame->delegated_frame_data = std::move(frame_data); 326 frame->delegated_frame_data = std::move(frame_data);
327 return frame; 327 return frame;
328 } 328 }
329 329
330 void DefaultPlatformDisplay::OnBoundsChanged(const gfx::Rect& new_bounds) { 330 void DefaultPlatformDisplay::OnBoundsChanged(const gfx::Rect& new_bounds) {
331 UpdateMetrics(new_bounds.size(), metrics_.device_scale_factor); 331 UpdateMetrics(new_bounds.size(), metrics_.device_scale_factor);
332 } 332 }
333 333
334 void DefaultPlatformDisplay::OnDamageRect(const gfx::Rect& damaged_region) { 334 void DefaultPlatformDisplay::OnDamageRect(const gfx::Rect& damaged_region) {
335 dirty_rect_.Union(damaged_region); 335 dirty_rect_.Union(damaged_region);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 409
410 void DefaultPlatformDisplay::RequestCopyOfOutput( 410 void DefaultPlatformDisplay::RequestCopyOfOutput(
411 std::unique_ptr<cc::CopyOutputRequest> output_request) { 411 std::unique_ptr<cc::CopyOutputRequest> output_request) {
412 if (display_compositor_) 412 if (display_compositor_)
413 display_compositor_->RequestCopyOfOutput(std::move(output_request)); 413 display_compositor_->RequestCopyOfOutput(std::move(output_request));
414 } 414 }
415 415
416 } // namespace ws 416 } // namespace ws
417 417
418 } // namespace mus 418 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698