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

Side by Side Diff: ui/compositor/layer.h

Issue 375693006: Snap layers in views to physical pixel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use cc::MathUtil::Round instead Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_COMPOSITOR_LAYER_H_ 5 #ifndef UI_COMPOSITOR_LAYER_H_
6 #define UI_COMPOSITOR_LAYER_H_ 6 #define UI_COMPOSITOR_LAYER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // transform otherwise. 135 // transform otherwise.
136 gfx::Transform GetTargetTransform() const; 136 gfx::Transform GetTargetTransform() const;
137 137
138 // The bounds, relative to the parent. 138 // The bounds, relative to the parent.
139 void SetBounds(const gfx::Rect& bounds); 139 void SetBounds(const gfx::Rect& bounds);
140 const gfx::Rect& bounds() const { return bounds_; } 140 const gfx::Rect& bounds() const { return bounds_; }
141 141
142 // The offset from our parent (stored in bounds.origin()) is an integer but we 142 // The offset from our parent (stored in bounds.origin()) is an integer but we
143 // may need to be at a fractional pixel offset to align properly on screen. 143 // may need to be at a fractional pixel offset to align properly on screen.
144 void SetSubpixelPositionOffset(const gfx::Vector2dF offset); 144 void SetSubpixelPositionOffset(const gfx::Vector2dF offset);
145 const gfx::Vector2dF& subpixel_position_offset() const {
146 return subpixel_position_offset_;
147 }
145 148
146 // Return the target bounds if animator is running, or the current bounds 149 // Return the target bounds if animator is running, or the current bounds
147 // otherwise. 150 // otherwise.
148 gfx::Rect GetTargetBounds() const; 151 gfx::Rect GetTargetBounds() const;
149 152
150 // Sets/gets whether or not drawing of child layers should be clipped to the 153 // Sets/gets whether or not drawing of child layers should be clipped to the
151 // bounds of this layer. 154 // bounds of this layer.
152 void SetMasksToBounds(bool masks_to_bounds); 155 void SetMasksToBounds(bool masks_to_bounds);
153 bool GetMasksToBounds() const; 156 bool GetMasksToBounds() const;
154 157
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 // The size of the frame or texture in DIP, set when SetShowDelegatedContent 490 // The size of the frame or texture in DIP, set when SetShowDelegatedContent
488 // or SetTextureMailbox was called. 491 // or SetTextureMailbox was called.
489 gfx::Size frame_size_in_dip_; 492 gfx::Size frame_size_in_dip_;
490 493
491 DISALLOW_COPY_AND_ASSIGN(Layer); 494 DISALLOW_COPY_AND_ASSIGN(Layer);
492 }; 495 };
493 496
494 } // namespace ui 497 } // namespace ui
495 498
496 #endif // UI_COMPOSITOR_LAYER_H_ 499 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698