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

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

Issue 1906623003: Convert //components/mus from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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.h » ('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 bfb51c1ff57d554731ed1459da2f6fed6adb286d..55de1b771771917a094d806c94bc8c95d54e09e4 100644
--- a/components/mus/ws/platform_display.cc
+++ b/components/mus/ws/platform_display.cc
@@ -282,7 +282,7 @@ void DefaultPlatformDisplay::Draw() {
return;
// TODO(fsamuel): We should add a trace for generating a top level frame.
- scoped_ptr<cc::CompositorFrame> frame(GenerateCompositorFrame());
+ std::unique_ptr<cc::CompositorFrame> frame(GenerateCompositorFrame());
frame_pending_ = true;
if (top_level_display_client_) {
top_level_display_client_->SubmitCompositorFrame(
@@ -329,9 +329,9 @@ void DefaultPlatformDisplay::UpdateMetrics(const gfx::Size& size,
delegate_->OnViewportMetricsChanged(old_metrics, metrics_);
}
-scoped_ptr<cc::CompositorFrame>
+std::unique_ptr<cc::CompositorFrame>
DefaultPlatformDisplay::GenerateCompositorFrame() {
- scoped_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create();
+ 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.To<gfx::Size>());
@@ -339,11 +339,12 @@ DefaultPlatformDisplay::GenerateCompositorFrame() {
DrawWindowTree(render_pass.get(), delegate_->GetRootWindow(), gfx::Vector2d(),
1.0f, &referenced_window_ids);
- scoped_ptr<cc::DelegatedFrameData> frame_data(new cc::DelegatedFrameData);
+ std::unique_ptr<cc::DelegatedFrameData> frame_data(
+ new cc::DelegatedFrameData);
frame_data->device_scale_factor = metrics_.device_pixel_ratio;
frame_data->render_pass_list.push_back(std::move(render_pass));
- scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
+ std::unique_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
frame->delegated_frame_data = std::move(frame_data);
return frame;
}
@@ -430,7 +431,7 @@ void DefaultPlatformDisplay::OnAcceleratedWidgetDestroyed() {
void DefaultPlatformDisplay::OnActivationChanged(bool active) {}
void DefaultPlatformDisplay::RequestCopyOfOutput(
- scoped_ptr<cc::CopyOutputRequest> output_request) {
+ std::unique_ptr<cc::CopyOutputRequest> output_request) {
if (top_level_display_client_)
top_level_display_client_->RequestCopyOfOutput(std::move(output_request));
}
« no previous file with comments | « components/mus/ws/platform_display.h ('k') | components/mus/ws/server_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698