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

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

Issue 2422973002: Revert of Convert a few more CFI blacklist entries into DISABLE_CFI_PERF attributes. (Closed)
Patch Set: Created 4 years, 2 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"
11 #include "core/layout/LayoutPart.h" 11 #include "core/layout/LayoutPart.h"
12 #include "core/layout/LayoutView.h" 12 #include "core/layout/LayoutView.h"
13 #include "core/layout/api/LayoutAPIShim.h" 13 #include "core/layout/api/LayoutAPIShim.h"
14 #include "core/layout/api/LayoutPartItem.h" 14 #include "core/layout/api/LayoutPartItem.h"
15 #include "core/layout/svg/LayoutSVGRoot.h" 15 #include "core/layout/svg/LayoutSVGRoot.h"
16 #include "core/layout/svg/SVGLayoutSupport.h" 16 #include "core/layout/svg/SVGLayoutSupport.h"
17 #include "core/paint/PaintInvalidator.h" 17 #include "core/paint/PaintInvalidator.h"
18 #include "core/paint/PaintLayer.h" 18 #include "core/paint/PaintLayer.h"
19 #include "core/paint/PaintPropertyTreeBuilder.h" 19 #include "core/paint/PaintPropertyTreeBuilder.h"
20 20
21 namespace blink { 21 namespace blink {
22 22
23 DISABLE_CFI_PERF
24 static bool supportsCachedOffsets(const LayoutObject& object) { 23 static bool supportsCachedOffsets(const LayoutObject& object) {
25 // Can't compute paint offsets across objects with transforms, but if they are 24 // Can't compute paint offsets across objects with transforms, but if they are
26 // paint invalidation containers, we don't actually need to compute *across* 25 // paint invalidation containers, we don't actually need to compute *across*
27 // the container, just up to it. (Also, such objects are the containing block 26 // the container, just up to it. (Also, such objects are the containing block
28 // for all children.) 27 // for all children.)
29 return !(object.hasTransformRelatedProperty() && 28 return !(object.hasTransformRelatedProperty() &&
30 !object.isPaintInvalidationContainer()) && 29 !object.isPaintInvalidationContainer()) &&
31 !object.hasFilterInducingProperty() && !object.isLayoutFlowThread() && 30 !object.hasFilterInducingProperty() && !object.isLayoutFlowThread() &&
32 !object.isLayoutMultiColumnSpannerPlaceholder() && 31 !object.isLayoutMultiColumnSpannerPlaceholder() &&
33 !object.styleRef().isFlippedBlocksWritingMode() && 32 !object.styleRef().isFlippedBlocksWritingMode() &&
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 object.localToAncestorPoint(point, &ancestor, TraverseDocumentBoundaries); 410 object.localToAncestorPoint(point, &ancestor, TraverseDocumentBoundaries);
412 // Paint invalidation does not include scroll of the ancestor. 411 // Paint invalidation does not include scroll of the ancestor.
413 if (ancestor.isBox()) { 412 if (ancestor.isBox()) {
414 const LayoutBox* box = toLayoutBox(&ancestor); 413 const LayoutBox* box = toLayoutBox(&ancestor);
415 if (box->hasOverflowClip()) 414 if (box->hasOverflowClip())
416 result.move(box->scrolledContentOffset()); 415 result.move(box->scrolledContentOffset());
417 } 416 }
418 return result; 417 return result;
419 } 418 }
420 419
421 DISABLE_CFI_PERF
422 LayoutPoint 420 LayoutPoint
423 PaintInvalidationState::computePositionFromPaintInvalidationBacking() const { 421 PaintInvalidationState::computePositionFromPaintInvalidationBacking() const {
424 #if ENABLE(ASSERT) 422 #if ENABLE(ASSERT)
425 DCHECK(!m_didUpdateForChildren); 423 DCHECK(!m_didUpdateForChildren);
426 #endif 424 #endif
427 425
428 FloatPoint point; 426 FloatPoint point;
429 if (m_paintInvalidationContainer != &m_currentObject) { 427 if (m_paintInvalidationContainer != &m_currentObject) {
430 if (m_cachedOffsetsEnabled) { 428 if (m_cachedOffsetsEnabled) {
431 if (m_currentObject.isSVG() && !m_currentObject.isSVGRoot()) 429 if (m_currentObject.isSVG() && !m_currentObject.isSVGRoot())
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 } 634 }
637 635
638 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking( 636 void PaintInvalidatorContextAdapter::mapLocalRectToPaintInvalidationBacking(
639 const LayoutObject& object, 637 const LayoutObject& object,
640 LayoutRect& rect) const { 638 LayoutRect& rect) const {
641 DCHECK(&object == &m_paintInvalidationState.currentObject()); 639 DCHECK(&object == &m_paintInvalidationState.currentObject());
642 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect); 640 m_paintInvalidationState.mapLocalRectToPaintInvalidationBacking(rect);
643 } 641 }
644 642
645 } // namespace blink 643 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/page/FrameTree.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698