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

Unified Diff: third_party/WebKit/Source/core/paint/FindPaintOffsetAndVisualRectNeedingUpdate.h

Issue 2858873002: [SPv2] Refactor PaintInvalidator to be multicol-ready. (Closed)
Patch Set: none Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/FindPaintOffsetAndVisualRectNeedingUpdate.h
diff --git a/third_party/WebKit/Source/core/paint/FindPaintOffsetAndVisualRectNeedingUpdate.h b/third_party/WebKit/Source/core/paint/FindPaintOffsetAndVisualRectNeedingUpdate.h
index 70ddf33b70458c0bb54e0616820c446bbe297af3..cae7bc76c31ed1c4725b60fa46434ca1a7d01fad 100644
--- a/third_party/WebKit/Source/core/paint/FindPaintOffsetAndVisualRectNeedingUpdate.h
+++ b/third_party/WebKit/Source/core/paint/FindPaintOffsetAndVisualRectNeedingUpdate.h
@@ -61,15 +61,15 @@ class FindVisualRectNeedingUpdateScopeBase {
protected:
FindVisualRectNeedingUpdateScopeBase(const LayoutObject& object,
const PaintInvalidatorContext& context,
- const LayoutRect& old_visual_rect)
+ const LayoutRect& old_visual_rect,
+ bool is_actually_needed)
: object_(object),
context_(context),
old_visual_rect_(old_visual_rect),
needed_visual_rect_update_(context.NeedsVisualRectUpdate(object)) {
if (needed_visual_rect_update_) {
DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() ||
- (context.tree_builder_context_ &&
- context.tree_builder_context_->is_actually_needed));
+ is_actually_needed);
return;
}
context.force_visual_rect_update_for_checking_ = true;
@@ -124,7 +124,11 @@ class FindVisualRectNeedingUpdateScope : FindVisualRectNeedingUpdateScopeBase {
// Must be a reference to a rect that
// outlives this scope.
const LayoutRect& new_visual_rect)
- : FindVisualRectNeedingUpdateScopeBase(object, context, old_visual_rect),
+ : FindVisualRectNeedingUpdateScopeBase(
+ object,
+ context,
+ old_visual_rect,
+ context.tree_builder_context_actually_needed_),
new_visual_rect_ref_(new_visual_rect) {}
~FindVisualRectNeedingUpdateScope() { CheckVisualRect(new_visual_rect_ref_); }
@@ -138,10 +142,12 @@ class FindObjectVisualRectNeedingUpdateScope
: FindVisualRectNeedingUpdateScopeBase {
public:
FindObjectVisualRectNeedingUpdateScope(const LayoutObject& object,
- const PaintInvalidatorContext& context)
+ const PaintInvalidatorContext& context,
+ bool is_actually_needed)
: FindVisualRectNeedingUpdateScopeBase(object,
context,
- object.VisualRect()),
+ object.VisualRect(),
+ is_actually_needed),
old_location_(ObjectPaintInvalidator(object).LocationInBacking()) {}
~FindObjectVisualRectNeedingUpdateScope() {

Powered by Google App Engine
This is Rietveld 408576698