OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_BLIMP_COMPOSITOR_PROTO_STATE_SINK_H_ |
| 6 #define CC_BLIMP_COMPOSITOR_PROTO_STATE_SINK_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "cc/base/cc_export.h" |
| 10 |
| 11 namespace cc { |
| 12 class CompositorProtoState; |
| 13 class CompositorStateSinkClient; |
| 14 |
| 15 class CC_EXPORT CompositorProtoStateSink { |
| 16 public: |
| 17 virtual ~CompositorProtoStateSink() {} |
| 18 |
| 19 // Must be called exactly once before the CompositorProtoStateSink can be |
| 20 // used. Once bound, the client is expected to outlive this class. |
| 21 virtual void BindToClient(CompositorStateSinkClient* client) = 0; |
| 22 |
| 23 // Notifies the sink that a main frame update is required. |
| 24 virtual void ScheduleMainFrame() = 0; |
| 25 |
| 26 // If a main frame update results in any mutations to the compositor state, |
| 27 // the serialized compositor state is provided to the |
| 28 // CompositorProtoStateSink. |
| 29 virtual void ProcessCompositorStateUpdate( |
| 30 std::unique_ptr<CompositorProtoState> compositor_proto_state) = 0; |
| 31 }; |
| 32 |
| 33 } // namespace cc |
| 34 #endif // CC_BLIMP_COMPOSITOR_PROTO_STATE_SINK_H_ |
OLD | NEW |