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

Unified Diff: cc/layers/layer.cc

Issue 877173002: Fixed position layer counter-scroll with main thread scroll offset fractional part (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ready for review Created 5 years, 11 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/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index feb23fa8d84f4e800c135e606335a47d103d03ff..219e63f3d9fc5fe294d91849f7721b5845d1658e 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -669,6 +669,8 @@ void Layer::SetScrollOffset(const gfx::ScrollOffset& scroll_offset) {
if (scroll_offset_ == scroll_offset)
return;
scroll_offset_ = scroll_offset;
+ scroll_offset_fractional_part_ = scroll_offset.DeltaFrom(
aelias_OOO_until_Jul13 2015/01/28 02:04:00 I see Dana made the comment on your doc "This seem
Yufeng Shen (Slow to review) 2015/01/28 04:49:23 would an API that takes 2 parameters be better ? e
aelias_OOO_until_Jul13 2015/01/28 05:50:29 I'd rather keep them separate, it makes sense not
Yufeng Shen (Slow to review) 2015/01/28 22:28:09 Done.
+ gfx::ScrollOffset(gfx::ScrollOffsetToFlooredVector2d(scroll_offset)));
SetNeedsCommit();
}
@@ -981,6 +983,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
}
layer->SetSentScrollDelta(gfx::Vector2dF());
}
+ layer->SetMainScrollOffsetFractionalPart(scroll_offset_fractional_part_);
// Wrap the copy_requests_ in a PostTask to the main thread.
ScopedPtrVector<CopyOutputRequest> main_thread_copy_requests;
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | cc/layers/layer_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698