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

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

Issue 1126963006: Move VISUAL_STATE promise to activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Current state (presubmit warnings, cc_unittests tests failing) 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 #ifndef CONTENT_RENDERER_GPU_QUEUE_MESSAGE_SWAP_PROMISE_H_ 5 #ifndef CONTENT_RENDERER_GPU_QUEUE_MESSAGE_SWAP_PROMISE_H_
6 #define CONTENT_RENDERER_GPU_QUEUE_MESSAGE_SWAP_PROMISE_H_ 6 #define CONTENT_RENDERER_GPU_QUEUE_MESSAGE_SWAP_PROMISE_H_
7 7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "cc/output/swap_promise.h" 8 #include "cc/output/swap_promise.h"
9 #include "content/renderer/gpu/queue_message_promise.h"
11 10
12 namespace IPC { 11 namespace IPC {
13 class SyncMessageFilter; 12 class SyncMessageFilter;
14 } 13 }
15 14
16 namespace content { 15 namespace content {
17 16
18 class FrameSwapMessageQueue; 17 class FrameUpdateMessageQueue;
19 18
20 class QueueMessageSwapPromise : public cc::SwapPromise { 19 class QueueMessageSwapPromise : public cc::SwapPromise,
20 public QueueMessagePromise {
21 public: 21 public:
22 QueueMessageSwapPromise(scoped_refptr<IPC::SyncMessageFilter> message_sender, 22 QueueMessageSwapPromise(scoped_refptr<IPC::SyncMessageFilter> message_sender,
23 scoped_refptr<FrameSwapMessageQueue> message_queue, 23 scoped_refptr<FrameUpdateMessageQueue> message_queue,
24 int source_frame_number); 24 int source_frame_number);
25 25
26 ~QueueMessageSwapPromise() override; 26 ~QueueMessageSwapPromise() override;
27 27
28 void DidSwap(cc::CompositorFrameMetadata* metadata) override; 28 void DidSwap(cc::CompositorFrameMetadata* metadata) override;
29 29
30 void DidNotSwap(DidNotSwapReason reason) override; 30 void DidNotSwap(DidNotSwap::Reason reason) override;
31 31
32 int64 TraceId() const override; 32 int64 TraceId() const override;
33
34 private:
35 void PromiseCompleted();
36
37 scoped_refptr<IPC::SyncMessageFilter> message_sender_;
38 scoped_refptr<content::FrameSwapMessageQueue> message_queue_;
39 int source_frame_number_;
40 #if DCHECK_IS_ON()
41 bool completed_;
42 #endif
43 }; 33 };
44 34
45 } // namespace content 35 } // namespace content
46 36
47 #endif // CONTENT_RENDERER_GPU_QUEUE_MESSAGE_SWAP_PROMISE_H_ 37 #endif // CONTENT_RENDERER_GPU_QUEUE_MESSAGE_SWAP_PROMISE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698