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_COMPOSITOR_EXTERNAL_BEGIN_FRAME_SOURCE_H_ | 5 #ifndef CONTENT_RENDERER_GPU_COMPOSITOR_EXTERNAL_BEGIN_FRAME_SOURCE_H_ |
6 #define CONTENT_RENDERER_GPU_COMPOSITOR_EXTERNAL_BEGIN_FRAME_SOURCE_H_ | 6 #define CONTENT_RENDERER_GPU_COMPOSITOR_EXTERNAL_BEGIN_FRAME_SOURCE_H_ |
7 | 7 |
8 #include <unordered_set> | 8 #include <unordered_set> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // cc::BeginFrameSource implementation. | 43 // cc::BeginFrameSource implementation. |
44 void AddObserver(cc::BeginFrameObserver* obs) override; | 44 void AddObserver(cc::BeginFrameObserver* obs) override; |
45 void RemoveObserver(cc::BeginFrameObserver* obs) override; | 45 void RemoveObserver(cc::BeginFrameObserver* obs) override; |
46 // TODO(eseckler): Track and forward BeginFrameAcks to browser. | 46 // TODO(eseckler): Track and forward BeginFrameAcks to browser. |
47 void DidFinishFrame(cc::BeginFrameObserver* obs, | 47 void DidFinishFrame(cc::BeginFrameObserver* obs, |
48 const cc::BeginFrameAck& ack) override {} | 48 const cc::BeginFrameAck& ack) override {} |
49 bool IsThrottled() const override; | 49 bool IsThrottled() const override; |
50 | 50 |
51 // cc::ExternalBeginFrameSourceClient implementation. | 51 // cc::ExternalBeginFrameSourceClient implementation. |
52 void OnNeedsBeginFrames(bool need_begin_frames) override; | 52 void OnNeedsBeginFrames(bool need_begin_frames) override; |
| 53 void OnDidFinishFrame(const cc::BeginFrameAck& ack) override; |
53 | 54 |
54 private: | 55 private: |
55 class CompositorExternalBeginFrameSourceProxy | 56 class CompositorExternalBeginFrameSourceProxy |
56 : public base::RefCountedThreadSafe< | 57 : public base::RefCountedThreadSafe< |
57 CompositorExternalBeginFrameSourceProxy> { | 58 CompositorExternalBeginFrameSourceProxy> { |
58 public: | 59 public: |
59 explicit CompositorExternalBeginFrameSourceProxy( | 60 explicit CompositorExternalBeginFrameSourceProxy( |
60 CompositorExternalBeginFrameSource* begin_frame_source) | 61 CompositorExternalBeginFrameSource* begin_frame_source) |
61 : begin_frame_source_(begin_frame_source) {} | 62 : begin_frame_source_(begin_frame_source) {} |
62 void ClearBeginFrameSource() { begin_frame_source_ = NULL; } | 63 void ClearBeginFrameSource() { begin_frame_source_ = NULL; } |
(...skipping 26 matching lines...) Expand all Loading... |
89 scoped_refptr<IPC::SyncMessageFilter> message_sender_; | 90 scoped_refptr<IPC::SyncMessageFilter> message_sender_; |
90 int routing_id_; | 91 int routing_id_; |
91 CompositorForwardingMessageFilter::Handler begin_frame_source_filter_handler_; | 92 CompositorForwardingMessageFilter::Handler begin_frame_source_filter_handler_; |
92 | 93 |
93 DISALLOW_COPY_AND_ASSIGN(CompositorExternalBeginFrameSource); | 94 DISALLOW_COPY_AND_ASSIGN(CompositorExternalBeginFrameSource); |
94 }; | 95 }; |
95 | 96 |
96 } // namespace content | 97 } // namespace content |
97 | 98 |
98 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_EXTERNAL_BEGIN_FRAME_SOURCE_H_ | 99 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_EXTERNAL_BEGIN_FRAME_SOURCE_H_ |
OLD | NEW |