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

Side by Side Diff: third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp

Issue 2792063002: Reland of Skip paint property update and visual rect update if no geometry change (Closed)
Patch Set: Rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/layout/PaintInvalidationState.h" 5 #include "core/layout/PaintInvalidationState.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/layout/LayoutInline.h" 10 #include "core/layout/LayoutInline.h"
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 LOG(ERROR) << "Fast path visual rect differs from slow path: fast: " 623 LOG(ERROR) << "Fast path visual rect differs from slow path: fast: "
624 << fastPathRect.toString() 624 << fastPathRect.toString()
625 << " vs slow: " << slowPathRect.toString(); 625 << " vs slow: " << slowPathRect.toString();
626 showLayoutTree(&m_currentObject); 626 showLayoutTree(&m_currentObject);
627 627
628 NOTREACHED(); 628 NOTREACHED();
629 } 629 }
630 630
631 #endif // CHECK_FAST_PATH_SLOW_PATH_EQUALITY 631 #endif // CHECK_FAST_PATH_SLOW_PATH_EQUALITY
632 632
633 static const PaintPropertyTreeBuilderContext& dummyTreeBuilderContext() {
634 DEFINE_STATIC_LOCAL(PaintPropertyTreeBuilderContext, dummyContext, ());
635 return dummyContext;
636 }
637
638 PaintInvalidatorContextAdapter::PaintInvalidatorContextAdapter( 633 PaintInvalidatorContextAdapter::PaintInvalidatorContextAdapter(
639 const PaintInvalidationState& paintInvalidationState) 634 const PaintInvalidationState& paintInvalidationState)
640 // The dummy parameters will be never used because the overriding 635 : PaintInvalidatorContext(nullptr),
641 // mapLocalRectToVisualRectInBacking() uses PaintInvalidationState.
642 : PaintInvalidatorContext(dummyTreeBuilderContext()),
643 m_paintInvalidationState(paintInvalidationState) { 636 m_paintInvalidationState(paintInvalidationState) {
644 forcedSubtreeInvalidationFlags = 637 forcedSubtreeInvalidationFlags =
645 paintInvalidationState.m_forcedSubtreeInvalidationFlags; 638 paintInvalidationState.m_forcedSubtreeInvalidationFlags;
646 paintInvalidationContainer = 639 paintInvalidationContainer =
647 &paintInvalidationState.paintInvalidationContainer(); 640 &paintInvalidationState.paintInvalidationContainer();
648 paintingLayer = &paintInvalidationState.paintingLayer(); 641 paintingLayer = &paintInvalidationState.paintingLayer();
649 } 642 }
650 643
651 void PaintInvalidatorContextAdapter::mapLocalRectToVisualRectInBacking( 644 void PaintInvalidatorContextAdapter::mapLocalRectToVisualRectInBacking(
652 const LayoutObject& object, 645 const LayoutObject& object,
653 LayoutRect& rect) const { 646 LayoutRect& rect) const {
654 DCHECK(&object == &m_paintInvalidationState.currentObject()); 647 DCHECK(&object == &m_paintInvalidationState.currentObject());
655 m_paintInvalidationState.mapLocalRectToVisualRectInBacking(rect); 648 m_paintInvalidationState.mapLocalRectToVisualRectInBacking(rect);
656 } 649 }
657 650
658 } // namespace blink 651 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698