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

Side by Side Diff: cc/layers/layer.h

Issue 1675963002: Move MaxScrollOffset to property_trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests failures Created 4 years, 10 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
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | cc/layers/layer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 CC_LAYERS_LAYER_H_ 5 #ifndef CC_LAYERS_LAYER_H_
6 #define CC_LAYERS_LAYER_H_ 6 #define CC_LAYERS_LAYER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 SkColor background_color() const { return background_color_; } 122 SkColor background_color() const { return background_color_; }
123 // If contents_opaque(), return an opaque color else return a 123 // If contents_opaque(), return an opaque color else return a
124 // non-opaque color. Tries to return background_color(), if possible. 124 // non-opaque color. Tries to return background_color(), if possible.
125 SkColor SafeOpaqueBackgroundColor() const; 125 SkColor SafeOpaqueBackgroundColor() const;
126 126
127 // A layer's bounds are in logical, non-page-scaled pixels (however, the 127 // A layer's bounds are in logical, non-page-scaled pixels (however, the
128 // root layer's bounds are in physical pixels). 128 // root layer's bounds are in physical pixels).
129 void SetBounds(const gfx::Size& bounds); 129 void SetBounds(const gfx::Size& bounds);
130 gfx::Size bounds() const { return bounds_; } 130 gfx::Size bounds() const { return bounds_; }
131 131
132 // This function is for property tree builder
133 gfx::Vector2dF bounds_delta() const { return gfx::Vector2dF(); }
134
132 void SetMasksToBounds(bool masks_to_bounds); 135 void SetMasksToBounds(bool masks_to_bounds);
133 bool masks_to_bounds() const { return masks_to_bounds_; } 136 bool masks_to_bounds() const { return masks_to_bounds_; }
134 137
135 void SetMaskLayer(Layer* mask_layer); 138 void SetMaskLayer(Layer* mask_layer);
136 Layer* mask_layer() { return mask_layer_.get(); } 139 Layer* mask_layer() { return mask_layer_.get(); }
137 const Layer* mask_layer() const { return mask_layer_.get(); } 140 const Layer* mask_layer() const { return mask_layer_.get(); }
138 141
139 virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect); 142 virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect);
140 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::Rect(bounds())); } 143 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::Rect(bounds())); }
141 144
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset); 267 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset);
265 void SetScrollCompensationAdjustment( 268 void SetScrollCompensationAdjustment(
266 const gfx::Vector2dF& scroll_compensation_adjustment); 269 const gfx::Vector2dF& scroll_compensation_adjustment);
267 gfx::Vector2dF ScrollCompensationAdjustment() const; 270 gfx::Vector2dF ScrollCompensationAdjustment() const;
268 271
269 gfx::ScrollOffset scroll_offset() const { return scroll_offset_; } 272 gfx::ScrollOffset scroll_offset() const { return scroll_offset_; }
270 void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset); 273 void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset);
271 274
272 void SetScrollClipLayerId(int clip_layer_id); 275 void SetScrollClipLayerId(int clip_layer_id);
273 bool scrollable() const { return scroll_clip_layer_id_ != INVALID_ID; } 276 bool scrollable() const { return scroll_clip_layer_id_ != INVALID_ID; }
277 Layer* scroll_clip_layer() const;
278 int scroll_clip_layer_id() const { return scroll_clip_layer_id_; }
274 279
275 void SetUserScrollable(bool horizontal, bool vertical); 280 void SetUserScrollable(bool horizontal, bool vertical);
276 bool user_scrollable_horizontal() const { 281 bool user_scrollable_horizontal() const {
277 return user_scrollable_horizontal_; 282 return user_scrollable_horizontal_;
278 } 283 }
279 bool user_scrollable_vertical() const { return user_scrollable_vertical_; } 284 bool user_scrollable_vertical() const { return user_scrollable_vertical_; }
280 285
281 void AddMainThreadScrollingReasons(uint32_t main_thread_scrolling_reasons); 286 void AddMainThreadScrollingReasons(uint32_t main_thread_scrolling_reasons);
282 void ClearMainThreadScrollingReasons(); 287 void ClearMainThreadScrollingReasons();
283 uint32_t main_thread_scrolling_reasons() const { 288 uint32_t main_thread_scrolling_reasons() const {
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 795
791 std::vector<FrameTimingRequest> frame_timing_requests_; 796 std::vector<FrameTimingRequest> frame_timing_requests_;
792 bool frame_timing_requests_dirty_; 797 bool frame_timing_requests_dirty_;
793 798
794 DISALLOW_COPY_AND_ASSIGN(Layer); 799 DISALLOW_COPY_AND_ASSIGN(Layer);
795 }; 800 };
796 801
797 } // namespace cc 802 } // namespace cc
798 803
799 #endif // CC_LAYERS_LAYER_H_ 804 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | cc/layers/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698