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

Unified Diff: cc/base/synced_property.h

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)
Patch Set: Addressed comments 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
Index: cc/base/synced_property.h
diff --git a/cc/base/synced_property.h b/cc/base/synced_property.h
index dfb33aa5ab2dfb859adeeccd652f983d693f88e2..41f4bf1ddb93edd7d7beea3f25183babc1c1e8b3 100644
--- a/cc/base/synced_property.h
+++ b/cc/base/synced_property.h
@@ -50,6 +50,17 @@ class SyncedProperty : public base::RefCounted<SyncedProperty<T>> {
return true;
}
+ // Adds the delta that has been reported to the main thread, and was expected
+ // to be reflected/resolved by the main thread in the commit, but could not
+ // be applied because it has not yet been resolved by the LayerTreeHostClient.
+ // The delta is added to the pending base so while the current value on
+ // the associated pending/active tree state simulates the result of the delta
+ // having not been applied to the main thread, but it is excluded in the
+ // subsequent deltas reported to the main thread.
+ void AddUnappliedDeltaToPendingBase(typename T::ValueType unapplied_delta) {
aelias_OOO_until_Jul13 2016/10/26 04:04:12 Could this new method be avoided by applying the d
Khushal 2016/10/26 19:02:35 It could, I'll just end up doing it at the calling
aelias_OOO_until_Jul13 2016/10/27 02:09:55 Right, I'd like to keep it self-contained and with
Khushal 2016/10/27 04:26:26 Oh, I see what you mean now. The place where Push
Khushal 2016/10/27 04:38:32 Or, may be this can be done here, right before syn
aelias_OOO_until_Jul13 2016/10/27 07:01:31 How about registering a did_scroll_callback that c
+ pending_base_ = pending_base_.Combine(T(unapplied_delta));
+ }
+
// Returns the difference between the last value that was committed and
// activated from the main thread, and the current total value.
typename T::ValueType Delta() const { return active_delta_.get(); }

Powered by Google App Engine
This is Rietveld 408576698