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

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

Issue 1452353002: Turn off computation of the interest rect in cc in synchronized paint mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 if (!delegate_) 744 if (!delegate_)
745 return; 745 return;
746 delegate_->OnDelegatedFrameDamage(damage_rect_in_dip); 746 delegate_->OnDelegatedFrameDamage(damage_rect_in_dip);
747 } 747 }
748 748
749 void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) { 749 void Layer::RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) {
750 cc_layer_->RequestCopyOfOutput(request.Pass()); 750 cc_layer_->RequestCopyOfOutput(request.Pass());
751 } 751 }
752 752
753 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( 753 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList(
754 const gfx::Rect& clip, 754 ContentLayerClient::PaintingControlSetting painting_control,
755 ContentLayerClient::PaintingControlSetting painting_control) { 755 gfx::Rect* recording_viewport) {
756 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); 756 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_);
757 gfx::Rect local_bounds(bounds().size()); 757 gfx::Rect local_bounds(bounds().size());
758 gfx::Rect invalidation( 758 gfx::Rect invalidation(
759 gfx::IntersectRects(damaged_region_.bounds(), local_bounds)); 759 gfx::IntersectRects(damaged_region_.bounds(), local_bounds));
760 DCHECK(clip.Contains(invalidation));
761 ClearDamagedRects(); 760 ClearDamagedRects();
762 cc::DisplayItemListSettings settings; 761 cc::DisplayItemListSettings settings;
763 settings.use_cached_picture = false; 762 settings.use_cached_picture = false;
764 scoped_refptr<cc::DisplayItemList> display_list = 763 scoped_refptr<cc::DisplayItemList> display_list =
765 cc::DisplayItemList::Create(clip, settings); 764 cc::DisplayItemList::Create(*recording_viewport, settings);
766 if (delegate_) { 765 if (delegate_) {
767 delegate_->OnPaintLayer( 766 delegate_->OnPaintLayer(
768 PaintContext(display_list.get(), device_scale_factor_, invalidation)); 767 PaintContext(display_list.get(), device_scale_factor_, invalidation));
769 } 768 }
770 display_list->Finalize(); 769 display_list->Finalize();
771 return display_list; 770 return display_list;
772 } 771 }
773 772
774 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } 773 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; }
775 774
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 animator_->RemoveFromCollection(collection); 1091 animator_->RemoveFromCollection(collection);
1093 for (auto* child : children_) 1092 for (auto* child : children_)
1094 child->RemoveAnimatorsInTreeFromCollection(collection); 1093 child->RemoveAnimatorsInTreeFromCollection(collection);
1095 } 1094 }
1096 1095
1097 bool Layer::IsAnimating() const { 1096 bool Layer::IsAnimating() const {
1098 return animator_.get() && animator_->is_animating(); 1097 return animator_.get() && animator_->is_animating();
1099 } 1098 }
1100 1099
1101 } // namespace ui 1100 } // namespace ui
OLDNEW
« cc/playback/display_list_recording_source.cc ('K') | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698