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

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

Issue 2849953004: SV Test
Patch Set: Created 3 years, 7 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 | « ui/compositor/layer.h ('k') | ui/compositor/paint_context.h » ('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 (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 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 880
881 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList( 881 scoped_refptr<cc::DisplayItemList> Layer::PaintContentsToDisplayList(
882 ContentLayerClient::PaintingControlSetting painting_control) { 882 ContentLayerClient::PaintingControlSetting painting_control) {
883 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_); 883 TRACE_EVENT1("ui", "Layer::PaintContentsToDisplayList", "name", name_);
884 gfx::Rect local_bounds(bounds().size()); 884 gfx::Rect local_bounds(bounds().size());
885 gfx::Rect invalidation( 885 gfx::Rect invalidation(
886 gfx::IntersectRects(paint_region_.bounds(), local_bounds)); 886 gfx::IntersectRects(paint_region_.bounds(), local_bounds));
887 paint_region_.Clear(); 887 paint_region_.Clear();
888 auto display_list = make_scoped_refptr(new cc::DisplayItemList); 888 auto display_list = make_scoped_refptr(new cc::DisplayItemList);
889 if (delegate_) { 889 if (delegate_) {
890 delegate_->OnPaintLayer( 890 PaintContext context(display_list.get(), device_scale_factor_,
891 PaintContext(display_list.get(), device_scale_factor_, invalidation)); 891 invalidation);
892 context.UpdateSizeAndDSF(
893 gfx::ScaleToCeiledSize(bounds().size(), device_scale_factor_),
894 bounds().size());
895 delegate_->OnPaintLayer(context);
892 } 896 }
893 display_list->Finalize(); 897 display_list->Finalize();
894 // TODO(domlaskowski): Move mirror invalidation to Layer::SchedulePaint. 898 // TODO(domlaskowski): Move mirror invalidation to Layer::SchedulePaint.
895 for (const auto& mirror : mirrors_) 899 for (const auto& mirror : mirrors_)
896 mirror->dest()->SchedulePaint(invalidation); 900 mirror->dest()->SchedulePaint(invalidation);
897 return display_list; 901 return display_list;
898 } 902 }
899 903
900 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } 904 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; }
901 905
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 const auto it = std::find_if(mirrors_.begin(), mirrors_.end(), 1197 const auto it = std::find_if(mirrors_.begin(), mirrors_.end(),
1194 [mirror](const std::unique_ptr<LayerMirror>& mirror_ptr) { 1198 [mirror](const std::unique_ptr<LayerMirror>& mirror_ptr) {
1195 return mirror_ptr.get() == mirror; 1199 return mirror_ptr.get() == mirror;
1196 }); 1200 });
1197 1201
1198 DCHECK(it != mirrors_.end()); 1202 DCHECK(it != mirrors_.end());
1199 mirrors_.erase(it); 1203 mirrors_.erase(it);
1200 } 1204 }
1201 1205
1202 } // namespace ui 1206 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer.h ('k') | ui/compositor/paint_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698