| OLD | NEW |
| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class QueueMessageSwapPromise : public cc::SwapPromise { | 21 class QueueMessageSwapPromise : public cc::SwapPromise { |
| 22 public: | 22 public: |
| 23 QueueMessageSwapPromise(scoped_refptr<IPC::SyncMessageFilter> message_sender, | 23 QueueMessageSwapPromise(scoped_refptr<IPC::SyncMessageFilter> message_sender, |
| 24 scoped_refptr<FrameSwapMessageQueue> message_queue, | 24 scoped_refptr<FrameSwapMessageQueue> message_queue, |
| 25 int source_frame_number); | 25 int source_frame_number); |
| 26 | 26 |
| 27 ~QueueMessageSwapPromise() override; | 27 ~QueueMessageSwapPromise() override; |
| 28 | 28 |
| 29 void DidActivate() override; | 29 void DidActivate() override; |
| 30 void DidSwap(cc::CompositorFrameMetadata* metadata) override; | 30 void DidSwap(cc::CompositorFrameMetadata* metadata) override; |
| 31 void DidNotSwap(DidNotSwapReason reason) override; | 31 bool DidNotSwap(DidNotSwapReason reason) override; |
| 32 | 32 |
| 33 int64_t TraceId() const override; | 33 int64_t TraceId() const override; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 void PromiseCompleted(); | 36 void PromiseCompleted(); |
| 37 | 37 |
| 38 scoped_refptr<IPC::SyncMessageFilter> message_sender_; | 38 scoped_refptr<IPC::SyncMessageFilter> message_sender_; |
| 39 scoped_refptr<content::FrameSwapMessageQueue> message_queue_; | 39 scoped_refptr<content::FrameSwapMessageQueue> message_queue_; |
| 40 int source_frame_number_; | 40 int source_frame_number_; |
| 41 #if DCHECK_IS_ON() | 41 #if DCHECK_IS_ON() |
| 42 bool completed_; | 42 bool completed_; |
| 43 #endif | 43 #endif |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace content | 46 } // namespace content |
| 47 | 47 |
| 48 #endif // CONTENT_RENDERER_GPU_QUEUE_MESSAGE_SWAP_PROMISE_H_ | 48 #endif // CONTENT_RENDERER_GPU_QUEUE_MESSAGE_SWAP_PROMISE_H_ |
| OLD | NEW |