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

Unified Diff: cc/surfaces/surface.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase 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 | « cc/surfaces/surface.h ('k') | cc/surfaces/surface_aggregator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface.cc
diff --git a/cc/surfaces/surface.cc b/cc/surfaces/surface.cc
index 281a69012a4c9f56d409a01c5c07854bb30206e0..173218c2e8e8aa349cdee2cd4a6a371e218355bc 100644
--- a/cc/surfaces/surface.cc
+++ b/cc/surfaces/surface.cc
@@ -41,7 +41,7 @@ Surface::~Surface() {
draw_callback_.Run(SurfaceDrawStatus::DRAW_SKIPPED);
}
-void Surface::QueueFrame(scoped_ptr<CompositorFrame> frame,
+void Surface::QueueFrame(std::unique_ptr<CompositorFrame> frame,
const DrawCallback& callback) {
DCHECK(factory_);
ClearCopyRequests();
@@ -50,7 +50,7 @@ void Surface::QueueFrame(scoped_ptr<CompositorFrame> frame,
TakeLatencyInfo(&frame->metadata.latency_info);
}
- scoped_ptr<CompositorFrame> previous_frame = std::move(current_frame_);
+ std::unique_ptr<CompositorFrame> previous_frame = std::move(current_frame_);
current_frame_ = std::move(frame);
if (current_frame_) {
@@ -95,10 +95,11 @@ void Surface::QueueFrame(scoped_ptr<CompositorFrame> frame,
}
}
-void Surface::RequestCopyOfOutput(scoped_ptr<CopyOutputRequest> copy_request) {
+void Surface::RequestCopyOfOutput(
+ std::unique_ptr<CopyOutputRequest> copy_request) {
if (current_frame_ &&
!current_frame_->delegated_frame_data->render_pass_list.empty()) {
- std::vector<scoped_ptr<CopyOutputRequest>>& copy_requests =
+ std::vector<std::unique_ptr<CopyOutputRequest>>& copy_requests =
current_frame_->delegated_frame_data->render_pass_list.back()
->copy_requests;
@@ -107,7 +108,7 @@ void Surface::RequestCopyOfOutput(scoped_ptr<CopyOutputRequest> copy_request) {
// source.
auto to_remove =
std::remove_if(copy_requests.begin(), copy_requests.end(),
- [source](const scoped_ptr<CopyOutputRequest>& x) {
+ [source](const std::unique_ptr<CopyOutputRequest>& x) {
return x->source() == source;
});
copy_requests.erase(to_remove, copy_requests.end());
@@ -119,7 +120,8 @@ void Surface::RequestCopyOfOutput(scoped_ptr<CopyOutputRequest> copy_request) {
}
void Surface::TakeCopyOutputRequests(
- std::multimap<RenderPassId, scoped_ptr<CopyOutputRequest>>* copy_requests) {
+ std::multimap<RenderPassId, std::unique_ptr<CopyOutputRequest>>*
+ copy_requests) {
DCHECK(copy_requests->empty());
if (current_frame_) {
for (const auto& render_pass :
« no previous file with comments | « cc/surfaces/surface.h ('k') | cc/surfaces/surface_aggregator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698