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

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

Issue 1484163002: Raster display item lists via a visual rect RTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 5 years 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
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 #include "ui/compositor/layer.h" 5 #include "ui/compositor/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( 757 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList(
758 ContentLayerClient::PaintingControlSetting painting_control) { 758 ContentLayerClient::PaintingControlSetting painting_control) {
759 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); 759 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_);
760 gfx::Rect local_bounds(bounds().size()); 760 gfx::Rect local_bounds(bounds().size());
761 gfx::Rect invalidation( 761 gfx::Rect invalidation(
762 gfx::IntersectRects(damaged_region_.bounds(), local_bounds)); 762 gfx::IntersectRects(damaged_region_.bounds(), local_bounds));
763 ClearDamagedRects(); 763 ClearDamagedRects();
764 cc::DisplayItemListSettings settings; 764 cc::DisplayItemListSettings settings;
765 settings.use_cached_picture = false; 765 settings.use_cached_picture = false;
766 scoped_refptr<cc::DisplayItemList> display_list = 766 scoped_refptr<cc::DisplayItemList> display_list =
767 cc::DisplayItemList::Create(PaintableRegion(), settings); 767 cc::DisplayItemList::Create(settings);
768 if (delegate_) { 768 if (delegate_) {
769 delegate_->OnPaintLayer( 769 delegate_->OnPaintLayer(
770 PaintContext(display_list.get(), device_scale_factor_, invalidation)); 770 PaintContext(display_list.get(), device_scale_factor_, invalidation));
771 } 771 }
772 display_list->Finalize(); 772 display_list->Finalize();
773 return display_list; 773 return display_list;
774 } 774 }
775 775
776 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } 776 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; }
777 777
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 animator_->RemoveFromCollection(collection); 1076 animator_->RemoveFromCollection(collection);
1077 for (auto* child : children_) 1077 for (auto* child : children_)
1078 child->RemoveAnimatorsInTreeFromCollection(collection); 1078 child->RemoveAnimatorsInTreeFromCollection(collection);
1079 } 1079 }
1080 1080
1081 bool Layer::IsAnimating() const { 1081 bool Layer::IsAnimating() const {
1082 return animator_.get() && animator_->is_animating(); 1082 return animator_.get() && animator_->is_animating();
1083 } 1083 }
1084 1084
1085 } // namespace ui 1085 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698