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

Side by Side Diff: content/renderer/gpu/queue_message_swap_promise.cc

Issue 1873783003: Convert //content/renderer 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 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 "content/renderer/gpu/queue_message_swap_promise.h" 5 #include "content/renderer/gpu/queue_message_swap_promise.h"
6 6
7 #include "content/renderer/gpu/frame_swap_message_queue.h" 7 #include "content/renderer/gpu/frame_swap_message_queue.h"
8 #include "ipc/ipc_sync_message_filter.h" 8 #include "ipc/ipc_sync_message_filter.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #endif 46 #endif
47 message_queue_->DidSwap(source_frame_number_); 47 message_queue_->DidSwap(source_frame_number_);
48 // The OutputSurface will take care of the Drain+Send. 48 // The OutputSurface will take care of the Drain+Send.
49 PromiseCompleted(); 49 PromiseCompleted();
50 } 50 }
51 51
52 void QueueMessageSwapPromise::DidNotSwap(DidNotSwapReason reason) { 52 void QueueMessageSwapPromise::DidNotSwap(DidNotSwapReason reason) {
53 #if DCHECK_IS_ON() 53 #if DCHECK_IS_ON()
54 DCHECK(!completed_); 54 DCHECK(!completed_);
55 #endif 55 #endif
56 std::vector<scoped_ptr<IPC::Message>> messages; 56 std::vector<std::unique_ptr<IPC::Message>> messages;
57 message_queue_->DidNotSwap(source_frame_number_, reason, &messages); 57 message_queue_->DidNotSwap(source_frame_number_, reason, &messages);
58 for (auto& msg : messages) { 58 for (auto& msg : messages) {
59 message_sender_->Send(msg.release()); 59 message_sender_->Send(msg.release());
60 } 60 }
61 PromiseCompleted(); 61 PromiseCompleted();
62 } 62 }
63 63
64 void QueueMessageSwapPromise::PromiseCompleted() { 64 void QueueMessageSwapPromise::PromiseCompleted() {
65 #if DCHECK_IS_ON() 65 #if DCHECK_IS_ON()
66 completed_ = true; 66 completed_ = true;
67 #endif 67 #endif
68 } 68 }
69 69
70 int64_t QueueMessageSwapPromise::TraceId() const { 70 int64_t QueueMessageSwapPromise::TraceId() const {
71 return 0; 71 return 0;
72 } 72 }
73 73
74 } // namespace content 74 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.cc ('k') | content/renderer/gpu/queue_message_swap_promise_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698