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

Unified Diff: ui/compositor/layer.h

Issue 317633006: Move SnapToPhysicalPixelBoundary call to RWHVA::InternalSetBounds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index 069f1671cf4f2b5ffcfbc251fc646d3b007154e3..03041edb872c1f4f66cec65a457f3ebf5aecd4ba 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -139,6 +139,10 @@ class COMPOSITOR_EXPORT Layer
void SetBounds(const gfx::Rect& bounds);
const gfx::Rect& bounds() const { return bounds_; }
+ // The offset from our parent (stored in bounds.origin()) is an integer but we
+ // may need to be at a fractional pixel offset to align properly on screen.
+ void SetSubpixelPositionOffset(const gfx::Vector2dF offset);
+
// Return the target bounds if animator is running, or the current bounds
// otherwise.
gfx::Rect GetTargetBounds() const;
@@ -410,6 +414,7 @@ class COMPOSITOR_EXPORT Layer
std::vector<Layer*> children_;
gfx::Rect bounds_;
+ gfx::Vector2dF subpixel_position_offset_;
// Visibility of this layer. See SetVisible/IsDrawn for more details.
bool visible_;
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698