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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp

Issue 2868283003: [SPv2] Renaming and refactor about raster invalidation tracking (Closed)
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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "core/frame/FrameView.h" 5 #include "core/frame/FrameView.h"
6 #include "core/layout/LayoutTestHelper.h" 6 #include "core/layout/LayoutTestHelper.h"
7 #include "core/layout/LayoutView.h" 7 #include "core/layout/LayoutView.h"
8 #include "core/paint/PaintLayer.h" 8 #include "core/paint/PaintLayer.h"
9 #include "platform/graphics/GraphicsLayer.h" 9 #include "platform/graphics/GraphicsLayer.h"
10 #include "platform/graphics/paint/RasterInvalidationTracking.h" 10 #include "platform/graphics/paint/RasterInvalidationTracking.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 EXPECT_EQ(kPaintInvalidationDelayedFull, 185 EXPECT_EQ(kPaintInvalidationDelayedFull,
186 target->FullPaintInvalidationReason()); 186 target->FullPaintInvalidationReason());
187 EXPECT_FALSE(target->NeedsPaintOffsetAndVisualRectUpdate()); 187 EXPECT_FALSE(target->NeedsPaintOffsetAndVisualRectUpdate());
188 GetDocument().View()->SetTracksPaintInvalidations(false); 188 GetDocument().View()->SetTracksPaintInvalidations(false);
189 189
190 GetDocument().View()->SetTracksPaintInvalidations(true); 190 GetDocument().View()->SetTracksPaintInvalidations(true);
191 // Scroll target into view. 191 // Scroll target into view.
192 GetDocument().domWindow()->scrollTo(0, 4000); 192 GetDocument().domWindow()->scrollTo(0, 4000);
193 GetDocument().View()->UpdateAllLifecyclePhases(); 193 GetDocument().View()->UpdateAllLifecyclePhases();
194 const auto& raster_invalidations = 194 const auto& raster_invalidations =
195 GetRasterInvalidationTracking()->tracked_raster_invalidations; 195 GetRasterInvalidationTracking()->invalidations;
196 ASSERT_EQ(1u, raster_invalidations.size()); 196 ASSERT_EQ(1u, raster_invalidations.size());
197 EXPECT_EQ(kPaintInvalidationNone, target->FullPaintInvalidationReason()); 197 EXPECT_EQ(kPaintInvalidationNone, target->FullPaintInvalidationReason());
198 EXPECT_EQ(IntRect(0, 4000, 100, 100), raster_invalidations[0].rect); 198 EXPECT_EQ(IntRect(0, 4000, 100, 100), raster_invalidations[0].rect);
199 EXPECT_EQ(kPaintInvalidationFull, raster_invalidations[0].reason); 199 EXPECT_EQ(kPaintInvalidationFull, raster_invalidations[0].reason);
200 EXPECT_FALSE(target->NeedsPaintOffsetAndVisualRectUpdate()); 200 EXPECT_FALSE(target->NeedsPaintOffsetAndVisualRectUpdate());
201 GetDocument().View()->SetTracksPaintInvalidations(false); 201 GetDocument().View()->SetTracksPaintInvalidations(false);
202 }; 202 };
203 203
204 } // namespace 204 } // namespace
205 205
206 } // namespace blink 206 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698