Chromium Code Reviews| 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(); } |