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

Unified Diff: cc/trees/transform_node.h

Issue 2451273003: cc : Snap texture layers to pixel boundary (Closed)
Patch Set: 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/trees/transform_node.h
diff --git a/cc/trees/transform_node.h b/cc/trees/transform_node.h
index 1e8c3910aaa08a8449e3a5136995e0f6661e04eb..a70312a03d2e53ba4b8f52d4c7b0172d2faae340 100644
--- a/cc/trees/transform_node.h
+++ b/cc/trees/transform_node.h
@@ -94,6 +94,8 @@ struct CC_EXPORT TransformNode {
bool scrolls : 1;
+ bool should_be_snapped : 1;
+
bool needs_surface_contents_scale : 1;
// These are used to position nodes wrt the right or bottom of the inner or
@@ -120,9 +122,10 @@ struct CC_EXPORT TransformNode {
// TODO(vollick): will be moved when accelerated effects are implemented.
gfx::ScrollOffset scroll_offset;
- // We scroll snap where possible, but this means fixed-pos elements must be
- // adjusted. This value stores the snapped amount for this purpose.
- gfx::Vector2dF scroll_snap;
+ // This value stores the snapped amount whenever we snap. If the snap is due
+ // to a scroll, we need it to calculate fixed-pos elements adjustment, even
+ // otherwise we may need it to undo the snapping next frame.
+ gfx::Vector2dF snap_amount;
// TODO(vollick): will be moved when accelerated effects are implemented.
gfx::Vector2dF source_offset;

Powered by Google App Engine
This is Rietveld 408576698