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

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

Issue 1126963006: Move VISUAL_STATE promise to activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: amend comments Created 5 years, 7 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 14 matching lines...) Expand all
25 DCHECK(message_queue_.get()); 25 DCHECK(message_queue_.get());
26 } 26 }
27 27
28 QueueMessageSwapPromise::~QueueMessageSwapPromise() { 28 QueueMessageSwapPromise::~QueueMessageSwapPromise() {
29 // The promise should have either been kept or broken before it's deleted. 29 // The promise should have either been kept or broken before it's deleted.
30 #if DCHECK_IS_ON() 30 #if DCHECK_IS_ON()
31 DCHECK(completed_); 31 DCHECK(completed_);
32 #endif 32 #endif
33 } 33 }
34 34
35 void QueueMessageSwapPromise::DidActivate() {
36 #if DCHECK_IS_ON()
37 DCHECK(!completed_);
38 #endif
39 message_queue_->DidActivate(source_frame_number_);
40 // The OutputSurface will take care of the Drain+Send.
41 }
42
35 void QueueMessageSwapPromise::DidSwap(cc::CompositorFrameMetadata* metadata) { 43 void QueueMessageSwapPromise::DidSwap(cc::CompositorFrameMetadata* metadata) {
36 #if DCHECK_IS_ON() 44 #if DCHECK_IS_ON()
37 DCHECK(!completed_); 45 DCHECK(!completed_);
38 #endif 46 #endif
39 message_queue_->DidSwap(source_frame_number_); 47 message_queue_->DidSwap(source_frame_number_);
40 // The OutputSurface will take care of the Drain+Send. 48 // The OutputSurface will take care of the Drain+Send.
41 PromiseCompleted(); 49 PromiseCompleted();
42 } 50 }
43 51
44 void QueueMessageSwapPromise::DidNotSwap(DidNotSwapReason reason) { 52 void QueueMessageSwapPromise::DidNotSwap(DidNotSwapReason reason) {
(...skipping 15 matching lines...) Expand all
60 #if DCHECK_IS_ON() 68 #if DCHECK_IS_ON()
61 completed_ = true; 69 completed_ = true;
62 #endif 70 #endif
63 } 71 }
64 72
65 int64 QueueMessageSwapPromise::TraceId() const { 73 int64 QueueMessageSwapPromise::TraceId() const {
66 return 0; 74 return 0;
67 } 75 }
68 76
69 } // namespace content 77 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/queue_message_swap_promise.h ('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