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

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

Issue 637913003: Revert of "Converted LayerImpl::bounds() to return SizeF." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « cc/layers/heads_up_display_layer_impl.cc ('k') | cc/layers/layer_impl.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } 357 }
358 int num_unclipped_descendants() const { 358 int num_unclipped_descendants() const {
359 return draw_properties_.num_unclipped_descendants; 359 return draw_properties_.num_unclipped_descendants;
360 } 360 }
361 361
362 // The client should be responsible for setting bounds, content bounds and 362 // The client should be responsible for setting bounds, content bounds and
363 // contents scale to appropriate values. LayerImpl doesn't calculate any of 363 // contents scale to appropriate values. LayerImpl doesn't calculate any of
364 // them from the other values. 364 // them from the other values.
365 365
366 void SetBounds(const gfx::Size& bounds); 366 void SetBounds(const gfx::Size& bounds);
367 gfx::SizeF bounds() const; 367 gfx::Size bounds() const;
368 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); 368 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta);
369 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } 369 gfx::Vector2dF bounds_delta() const { return bounds_delta_; }
370 370
371 void SetContentBounds(const gfx::Size& content_bounds); 371 void SetContentBounds(const gfx::Size& content_bounds);
372 gfx::Size content_bounds() const { return draw_properties_.content_bounds; } 372 gfx::Size content_bounds() const { return draw_properties_.content_bounds; }
373 373
374 float contents_scale_x() const { return draw_properties_.contents_scale_x; } 374 float contents_scale_x() const { return draw_properties_.contents_scale_x; }
375 float contents_scale_y() const { return draw_properties_.contents_scale_y; } 375 float contents_scale_y() const { return draw_properties_.contents_scale_y; }
376 void SetContentsScale(float contents_scale_x, float contents_scale_y); 376 void SetContentsScale(float contents_scale_x, float contents_scale_y);
377 377
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 return scrollbar_animation_controller_.get(); 508 return scrollbar_animation_controller_.get();
509 } 509 }
510 510
511 typedef std::set<ScrollbarLayerImplBase*> ScrollbarSet; 511 typedef std::set<ScrollbarLayerImplBase*> ScrollbarSet;
512 ScrollbarSet* scrollbars() { return scrollbars_.get(); } 512 ScrollbarSet* scrollbars() { return scrollbars_.get(); }
513 void ClearScrollbars(); 513 void ClearScrollbars();
514 void AddScrollbar(ScrollbarLayerImplBase* layer); 514 void AddScrollbar(ScrollbarLayerImplBase* layer);
515 void RemoveScrollbar(ScrollbarLayerImplBase* layer); 515 void RemoveScrollbar(ScrollbarLayerImplBase* layer);
516 bool HasScrollbar(ScrollbarOrientation orientation) const; 516 bool HasScrollbar(ScrollbarOrientation orientation) const;
517 void ScrollbarParametersDidChange(bool on_resize); 517 void ScrollbarParametersDidChange(bool on_resize);
518 int clip_height() {
519 return scroll_clip_layer_ ? scroll_clip_layer_->bounds().height() : 0;
520 }
518 521
519 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; 522 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const;
520 523
521 virtual skia::RefPtr<SkPicture> GetPicture(); 524 virtual skia::RefPtr<SkPicture> GetPicture();
522 525
523 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); 526 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl);
524 virtual void PushPropertiesTo(LayerImpl* layer); 527 virtual void PushPropertiesTo(LayerImpl* layer);
525 528
526 virtual void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; 529 virtual void GetAllTilesForTracing(std::set<const Tile*>* tiles) const;
527 virtual void AsValueInto(base::debug::TracedValue* dict) const; 530 virtual void AsValueInto(base::debug::TracedValue* dict) const;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 DrawProperties<LayerImpl> draw_properties_; 707 DrawProperties<LayerImpl> draw_properties_;
705 708
706 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; 709 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_;
707 710
708 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 711 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
709 }; 712 };
710 713
711 } // namespace cc 714 } // namespace cc
712 715
713 #endif // CC_LAYERS_LAYER_IMPL_H_ 716 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/heads_up_display_layer_impl.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698