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

Unified Diff: cc/test/fake_content_layer_client.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 side-by-side diff with in-line comments
Download patch
Index: cc/test/fake_content_layer_client.cc
diff --git a/cc/test/fake_content_layer_client.cc b/cc/test/fake_content_layer_client.cc
index bfa7c19b36ab6ff22683d1ef01a30aa21400a326..97bbe7a64316dc1f58bad5a6f55e4d5944e5e7a4 100644
--- a/cc/test/fake_content_layer_client.cc
+++ b/cc/test/fake_content_layer_client.cc
@@ -37,19 +37,19 @@ FakeContentLayerClient::~FakeContentLayerClient() {
scoped_refptr<DisplayItemList>
FakeContentLayerClient::PaintContentsToDisplayList(
- const gfx::Rect& clip,
- PaintingControlSetting painting_control) {
+ PaintingControlSetting painting_control,
+ gfx::Rect* recording_viewport) {
// Cached picture is used because unit tests expect to be able to
// use GatherPixelRefs.
DisplayItemListSettings settings;
settings.use_cached_picture = true;
scoped_refptr<DisplayItemList> display_list =
- DisplayItemList::Create(clip, settings);
+ DisplayItemList::Create(*recording_viewport, settings);
SkPictureRecorder recorder;
skia::RefPtr<SkCanvas> canvas;
skia::RefPtr<SkPicture> picture;
auto* item = display_list->CreateAndAppendItem<ClipDisplayItem>();
- item->SetNew(clip, std::vector<SkRRect>());
+ item->SetNew(*recording_viewport, std::vector<SkRRect>());
for (RectPaintVector::const_iterator it = draw_rects_.begin();
it != draw_rects_.end(); ++it) {
@@ -82,7 +82,7 @@ FakeContentLayerClient::PaintContentsToDisplayList(
}
if (fill_with_nonsolid_color_) {
- gfx::Rect draw_rect = clip;
+ gfx::Rect draw_rect = *recording_viewport;
bool red = true;
while (!draw_rect.IsEmpty()) {
SkPaint paint;

Powered by Google App Engine
This is Rietveld 408576698