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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blimp/remote_compositor_bridge_client.h
diff --git a/cc/blimp/remote_compositor_bridge_client.h b/cc/blimp/remote_compositor_bridge_client.h
index 434dd0abfae24bbc7a14c9148176e23236ddeb37..1df4e0af2f52d39fc214e7afc3d0a7606cab437f 100644
--- a/cc/blimp/remote_compositor_bridge_client.h
+++ b/cc/blimp/remote_compositor_bridge_client.h
@@ -5,6 +5,8 @@
#ifndef CC_BLIMP_REMOTE_COMPOSITOR_BRIDGE_CLIENT_H_
#define CC_BLIMP_REMOTE_COMPOSITOR_BRIDGE_CLIENT_H_
+#include <unordered_map>
+
#include "base/macros.h"
#include "cc/base/cc_export.h"
@@ -12,11 +14,17 @@ namespace base {
class SingleThreadTaskRunner;
} // namespace base
+namespace gfx {
+class ScrollOffset;
+} // namespace gfx
+
namespace cc {
class CompositorProtoState;
class CC_EXPORT RemoteCompositorBridgeClient {
public:
+ using ScrollOffsetMap = std::unordered_map<int, gfx::ScrollOffset>;
+
virtual ~RemoteCompositorBridgeClient() {}
// Called in response to a ScheduleMainFrame request made on the
@@ -24,6 +32,14 @@ class CC_EXPORT RemoteCompositorBridgeClient {
// Note: The method should always be invoked asynchronously after the request
// is made.
virtual void BeginMainFrame() = 0;
+
+ // Provides an update from the mutations made on the client. Returns true if
+ // the update could be successfully applied to the engine state. This can
+ // fail, for instance, if the layer present in the update was destroyed on the
+ // engine.
+ virtual bool ApplyScrollAndScaleUpdateFromClient(
+ const ScrollOffsetMap& client_scroll_map,
+ float client_page_scale) = 0;
};
} // namespace cc
« 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