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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 gfx::Transform transform() const; 132 gfx::Transform transform() const;
133 133
134 // Return the target transform if animator is running, or the current 134 // Return the target transform if animator is running, or the current
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
143 // may need to be at a fractional pixel offset to align properly on screen.
144 void SetSubpixelPositionOffset(const gfx::Vector2dF offset);
145
142 // Return the target bounds if animator is running, or the current bounds 146 // Return the target bounds if animator is running, or the current bounds
143 // otherwise. 147 // otherwise.
144 gfx::Rect GetTargetBounds() const; 148 gfx::Rect GetTargetBounds() const;
145 149
146 // Sets/gets whether or not drawing of child layers should be clipped to the 150 // Sets/gets whether or not drawing of child layers should be clipped to the
147 // bounds of this layer. 151 // bounds of this layer.
148 void SetMasksToBounds(bool masks_to_bounds); 152 void SetMasksToBounds(bool masks_to_bounds);
149 bool GetMasksToBounds() const; 153 bool GetMasksToBounds() const;
150 154
151 // The opacity of the layer. The opacity is applied to each pixel of the 155 // The opacity of the layer. The opacity is applied to each pixel of the
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 const LayerType type_; 407 const LayerType type_;
404 408
405 Compositor* compositor_; 409 Compositor* compositor_;
406 410
407 Layer* parent_; 411 Layer* parent_;
408 412
409 // This layer's children, in bottom-to-top stacking order. 413 // This layer's children, in bottom-to-top stacking order.
410 std::vector<Layer*> children_; 414 std::vector<Layer*> children_;
411 415
412 gfx::Rect bounds_; 416 gfx::Rect bounds_;
417 gfx::Vector2dF subpixel_position_offset_;
413 418
414 // Visibility of this layer. See SetVisible/IsDrawn for more details. 419 // Visibility of this layer. See SetVisible/IsDrawn for more details.
415 bool visible_; 420 bool visible_;
416 421
417 bool force_render_surface_; 422 bool force_render_surface_;
418 423
419 bool fills_bounds_opaquely_; 424 bool fills_bounds_opaquely_;
420 bool fills_bounds_completely_; 425 bool fills_bounds_completely_;
421 426
422 // Union of damaged rects, in pixel coordinates, to be used when 427 // Union of damaged rects, in pixel coordinates, to be used when
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 // The size of the frame or texture in DIP, set when SetShowDelegatedContent 487 // The size of the frame or texture in DIP, set when SetShowDelegatedContent
483 // or SetTextureMailbox was called. 488 // or SetTextureMailbox was called.
484 gfx::Size frame_size_in_dip_; 489 gfx::Size frame_size_in_dip_;
485 490
486 DISALLOW_COPY_AND_ASSIGN(Layer); 491 DISALLOW_COPY_AND_ASSIGN(Layer);
487 }; 492 };
488 493
489 } // namespace ui 494 } // namespace ui
490 495
491 #endif // UI_COMPOSITOR_LAYER_H_ 496 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW
« 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