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

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

Issue 2332053002: Add DISABLE_CFI_PERF attribute on the methods with CFI checks disabled. (Closed)
Patch Set: LayoutObject, LayoutObjectChildList Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/paint/ObjectPaintInvalidator.h" 5 #include "core/paint/ObjectPaintInvalidator.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/layout/LayoutBlockFlow.h" 9 #include "core/layout/LayoutBlockFlow.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 DisableCompositingQueryAsserts disabler; 107 DisableCompositingQueryAsserts disabler;
108 108
109 slowSetPaintingLayerNeedsRepaint(); 109 slowSetPaintingLayerNeedsRepaint();
110 traverseNonCompositingDescendantsInPaintOrder(m_object, [reason](const Layou tObject& object) { 110 traverseNonCompositingDescendantsInPaintOrder(m_object, [reason](const Layou tObject& object) {
111 if (object.hasLayer() && toLayoutBoxModelObject(object).hasSelfPaintingL ayer()) 111 if (object.hasLayer() && toLayoutBoxModelObject(object).hasSelfPaintingL ayer())
112 toLayoutBoxModelObject(object).layer()->setNeedsRepaint(); 112 toLayoutBoxModelObject(object).layer()->setNeedsRepaint();
113 object.invalidateDisplayItemClients(reason); 113 object.invalidateDisplayItemClients(reason);
114 }); 114 });
115 } 115 }
116 116
117 DISABLE_CFI_PERF
117 void ObjectPaintInvalidator::invalidatePaintOfPreviousPaintInvalidationRect(cons t LayoutBoxModelObject& paintInvalidationContainer, PaintInvalidationReason reas on) 118 void ObjectPaintInvalidator::invalidatePaintOfPreviousPaintInvalidationRect(cons t LayoutBoxModelObject& paintInvalidationContainer, PaintInvalidationReason reas on)
118 { 119 {
119 // It's caller's responsibility to ensure enclosingSelfPaintingLayer's needs Repaint is set. 120 // It's caller's responsibility to ensure enclosingSelfPaintingLayer's needs Repaint is set.
120 // Don't set the flag here because getting enclosingSelfPaintLayer has cost and the caller can use 121 // Don't set the flag here because getting enclosingSelfPaintLayer has cost and the caller can use
121 // various ways (e.g. PaintInvalidatinState::enclosingSelfPaintingLayer()) t o reduce the cost. 122 // various ways (e.g. PaintInvalidatinState::enclosingSelfPaintingLayer()) t o reduce the cost.
122 DCHECK(!m_object.paintingLayer() || m_object.paintingLayer()->needsRepaint() ); 123 DCHECK(!m_object.paintingLayer() || m_object.paintingLayer()->needsRepaint() );
123 124
124 // These disablers are valid because we want to use the current compositing/ invalidation status. 125 // These disablers are valid because we want to use the current compositing/ invalidation status.
125 DisablePaintInvalidationStateAsserts invalidationDisabler; 126 DisablePaintInvalidationStateAsserts invalidationDisabler;
126 DisableCompositingQueryAsserts compositingDisabler; 127 DisableCompositingQueryAsserts compositingDisabler;
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 m_object.invalidateDisplayItemClients(reason); 474 m_object.invalidateDisplayItemClients(reason);
474 return reason; 475 return reason;
475 } 476 }
476 477
477 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts() 478 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts()
478 : m_disabler(&gDisablePaintInvalidationStateAsserts, true) 479 : m_disabler(&gDisablePaintInvalidationStateAsserts, true)
479 { 480 {
480 } 481 }
481 482
482 } // namespace blink 483 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObjectChildList.cpp ('k') | tools/cfi/blacklist.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698