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

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 634683003: 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/trees/layer_tree_impl.h ('k') | cc/trees/layer_tree_impl_unittest.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 #include "cc/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 9
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 "CalcDrawProperties should not set_needs_update_draw_properties()"; 563 "CalcDrawProperties should not set_needs_update_draw_properties()";
564 return true; 564 return true;
565 } 565 }
566 566
567 const LayerImplList& LayerTreeImpl::RenderSurfaceLayerList() const { 567 const LayerImplList& LayerTreeImpl::RenderSurfaceLayerList() const {
568 // If this assert triggers, then the list is dirty. 568 // If this assert triggers, then the list is dirty.
569 DCHECK(!needs_update_draw_properties_); 569 DCHECK(!needs_update_draw_properties_);
570 return render_surface_layer_list_; 570 return render_surface_layer_list_;
571 } 571 }
572 572
573 gfx::Size LayerTreeImpl::ScrollableSize() const { 573 gfx::SizeF LayerTreeImpl::ScrollableSize() const {
574 LayerImpl* root_scroll_layer = OuterViewportScrollLayer() 574 LayerImpl* root_scroll_layer = OuterViewportScrollLayer()
575 ? OuterViewportScrollLayer() 575 ? OuterViewportScrollLayer()
576 : InnerViewportScrollLayer(); 576 : InnerViewportScrollLayer();
577 if (!root_scroll_layer || root_scroll_layer->children().empty()) 577 if (!root_scroll_layer || root_scroll_layer->children().empty())
578 return gfx::Size(); 578 return gfx::SizeF();
579 return root_scroll_layer->children()[0]->bounds(); 579 return root_scroll_layer->children()[0]->bounds();
580 } 580 }
581 581
582 LayerImpl* LayerTreeImpl::LayerById(int id) { 582 LayerImpl* LayerTreeImpl::LayerById(int id) {
583 LayerIdMap::iterator iter = layer_id_map_.find(id); 583 LayerIdMap::iterator iter = layer_id_map_.find(id);
584 return iter != layer_id_map_.end() ? iter->second : NULL; 584 return iter != layer_id_map_.end() ? iter->second : NULL;
585 } 585 }
586 586
587 void LayerTreeImpl::RegisterLayer(LayerImpl* layer) { 587 void LayerTreeImpl::RegisterLayer(LayerImpl* layer) {
588 DCHECK(!LayerById(layer->id())); 588 DCHECK(!LayerById(layer->id()));
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 page_scale, 1496 page_scale,
1497 duration.InSecondsF()); 1497 duration.InSecondsF());
1498 } 1498 }
1499 } 1499 }
1500 1500
1501 scoped_ptr<PageScaleAnimation> LayerTreeImpl::TakePageScaleAnimation() { 1501 scoped_ptr<PageScaleAnimation> LayerTreeImpl::TakePageScaleAnimation() {
1502 return page_scale_animation_.Pass(); 1502 return page_scale_animation_.Pass();
1503 } 1503 }
1504 1504
1505 } // namespace cc 1505 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698