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

Side by Side Diff: cc/blimp/remote_compositor_bridge_client.h

Issue 2404953002: cc/blimp: Set up hooks for scroll/scale sync. (Closed)
Patch Set: braces Created 4 years, 2 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
« no previous file with comments | « cc/blimp/layer_tree_host_remote_unittest.cc ('k') | cc/test/fake_remote_compositor_bridge.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 CC_BLIMP_REMOTE_COMPOSITOR_BRIDGE_CLIENT_H_ 5 #ifndef CC_BLIMP_REMOTE_COMPOSITOR_BRIDGE_CLIENT_H_
6 #define CC_BLIMP_REMOTE_COMPOSITOR_BRIDGE_CLIENT_H_ 6 #define CC_BLIMP_REMOTE_COMPOSITOR_BRIDGE_CLIENT_H_
7 7
8 #include <unordered_map>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
10 12
11 namespace base { 13 namespace base {
12 class SingleThreadTaskRunner; 14 class SingleThreadTaskRunner;
13 } // namespace base 15 } // namespace base
14 16
17 namespace gfx {
18 class ScrollOffset;
19 } // namespace gfx
20
15 namespace cc { 21 namespace cc {
16 class CompositorProtoState; 22 class CompositorProtoState;
17 23
18 class CC_EXPORT RemoteCompositorBridgeClient { 24 class CC_EXPORT RemoteCompositorBridgeClient {
19 public: 25 public:
26 using ScrollOffsetMap = std::unordered_map<int, gfx::ScrollOffset>;
27
20 virtual ~RemoteCompositorBridgeClient() {} 28 virtual ~RemoteCompositorBridgeClient() {}
21 29
22 // Called in response to a ScheduleMainFrame request made on the 30 // Called in response to a ScheduleMainFrame request made on the
23 // RemoteCompositorBridge. 31 // RemoteCompositorBridge.
24 // Note: The method should always be invoked asynchronously after the request 32 // Note: The method should always be invoked asynchronously after the request
25 // is made. 33 // is made.
26 virtual void BeginMainFrame() = 0; 34 virtual void BeginMainFrame() = 0;
35
36 // Provides an update from the mutations made on the client. Returns true if
37 // the update could be successfully applied to the engine state. This can
38 // fail, for instance, if the layer present in the update was destroyed on the
39 // engine.
40 virtual bool ApplyScrollAndScaleUpdateFromClient(
41 const ScrollOffsetMap& client_scroll_map,
42 float client_page_scale) = 0;
27 }; 43 };
28 44
29 } // namespace cc 45 } // namespace cc
30 46
31 #endif // CC_BLIMP_REMOTE_COMPOSITOR_BRIDGE_CLIENT_H_ 47 #endif // CC_BLIMP_REMOTE_COMPOSITOR_BRIDGE_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/blimp/layer_tree_host_remote_unittest.cc ('k') | cc/test/fake_remote_compositor_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698