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

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: fix unittests 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
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index feb23fa8d84f4e800c135e606335a47d103d03ff..f546a88b44b12dda7af7f16ec4cf039ab70ff612 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -672,6 +672,18 @@ void Layer::SetScrollOffset(const gfx::ScrollOffset& scroll_offset) {
SetNeedsCommit();
}
+void Layer::SetScrollOffsetFractionalPart(
+ const gfx::Vector2dF& scroll_offset_fractional_part) {
+ if (scroll_offset_fractional_part_ == scroll_offset_fractional_part)
+ return;
+ scroll_offset_fractional_part_ = scroll_offset_fractional_part;
+ SetNeedsCommit();
+}
+
+gfx::Vector2dF Layer::MainScrollOffsetFractionalPart() const {
+ return scroll_offset_fractional_part_;
+}
+
void Layer::SetScrollOffsetFromImplSide(
const gfx::ScrollOffset& scroll_offset) {
DCHECK(IsPropertyChangeAllowed());
@@ -981,6 +993,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
}
layer->SetSentScrollDelta(gfx::Vector2dF());
}
+ layer->SetMainScrollOffsetFractionalPart(MainScrollOffsetFractionalPart());
// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698