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

Side by Side Diff: Source/core/rendering/RenderObject.cpp

Issue 465223002: [ Do not submit ] Prototype for invalidation analysis Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Unify the three invalidation trace event categories Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 void RenderObject::invalidatePaintUsingContainer(const RenderLayerModelObject* p aintInvalidationContainer, const LayoutRect& r, InvalidationReason invalidationR eason) const 1483 void RenderObject::invalidatePaintUsingContainer(const RenderLayerModelObject* p aintInvalidationContainer, const LayoutRect& r, InvalidationReason invalidationR eason) const
1484 { 1484 {
1485 if (r.isEmpty()) 1485 if (r.isEmpty())
1486 return; 1486 return;
1487 1487
1488 // FIXME: This should be an assert, but editing/selection can trigger this c ase to invalidate 1488 // FIXME: This should be an assert, but editing/selection can trigger this c ase to invalidate
1489 // the selection. crbug.com/368140. 1489 // the selection. crbug.com/368140.
1490 if (!isRooted()) 1490 if (!isRooted())
1491 return; 1491 return;
1492 1492
1493 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidati onTracking"),
1494 "PaintInvalidationTracking",
1495 "data", InspectorPaintInvalidationTrackingEvent::data(this, paintInvalid ationContainer));
1496
1493 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), "RenderObject: :invalidatePaintUsingContainer()", 1497 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), "RenderObject: :invalidatePaintUsingContainer()",
1494 "object", this->debugName().ascii(), 1498 "object", this->debugName().ascii(),
1495 "info", jsonObjectForPaintInvalidationInfo(r, invalidationReasonToString (invalidationReason))); 1499 "info", jsonObjectForPaintInvalidationInfo(r, invalidationReasonToString (invalidationReason)));
1496 1500
1497 if (paintInvalidationContainer->isRenderFlowThread()) { 1501 if (paintInvalidationContainer->isRenderFlowThread()) {
1498 toRenderFlowThread(paintInvalidationContainer)->paintInvalidationRectang leInRegions(r); 1502 toRenderFlowThread(paintInvalidationContainer)->paintInvalidationRectang leInRegions(r);
1499 return; 1503 return;
1500 } 1504 }
1501 1505
1502 if (paintInvalidationContainer->isRenderView()) { 1506 if (paintInvalidationContainer->isRenderView()) {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 return InvalidationNone; // Don't invalidate paints if we're printing. 1625 return InvalidationNone; // Don't invalidate paints if we're printing.
1622 1626
1623 const LayoutRect& newBounds = previousPaintInvalidationRect(); 1627 const LayoutRect& newBounds = previousPaintInvalidationRect();
1624 const LayoutPoint& newLocation = previousPositionFromPaintInvalidationContai ner(); 1628 const LayoutPoint& newLocation = previousPositionFromPaintInvalidationContai ner();
1625 1629
1626 // FIXME: PaintInvalidationState should not be required here, but the call t o flipForWritingMode 1630 // FIXME: PaintInvalidationState should not be required here, but the call t o flipForWritingMode
1627 // in mapRectToPaintInvalidationBacking will give us the wrong results with it disabled. 1631 // in mapRectToPaintInvalidationBacking will give us the wrong results with it disabled.
1628 // crbug.com/393762 1632 // crbug.com/393762
1629 ASSERT(newBounds == boundsRectForPaintInvalidation(&paintInvalidationContain er, &paintInvalidationState)); 1633 ASSERT(newBounds == boundsRectForPaintInvalidation(&paintInvalidationContain er, &paintInvalidationState));
1630 1634
1635 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidati onTracking"),
1636 "PaintInvalidationTracking",
1637 "data", InspectorPaintInvalidationTrackingEvent::data(this, &paintInvali dationContainer));
1638
1631 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), "RenderObject: :invalidatePaintIfNeeded()", 1639 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), "RenderObject: :invalidatePaintIfNeeded()",
1632 "object", this->debugName().ascii(), 1640 "object", this->debugName().ascii(),
1633 "info", jsonObjectForOldAndNewRects(oldBounds, newBounds)); 1641 "info", jsonObjectForOldAndNewRects(oldBounds, newBounds));
1634 1642
1635 InvalidationReason invalidationReason = getPaintInvalidationReason(paintInva lidationContainer, oldBounds, oldLocation, newBounds, newLocation); 1643 InvalidationReason invalidationReason = getPaintInvalidationReason(paintInva lidationContainer, oldBounds, oldLocation, newBounds, newLocation);
1636 1644
1637 if (invalidationReason == InvalidationNone) 1645 if (invalidationReason == InvalidationNone)
1638 return invalidationReason; 1646 return invalidationReason;
1639 1647
1640 if (invalidationReason == InvalidationIncremental) { 1648 if (invalidationReason == InvalidationIncremental) {
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
3445 { 3453 {
3446 if (object1) { 3454 if (object1) {
3447 const blink::RenderObject* root = object1; 3455 const blink::RenderObject* root = object1;
3448 while (root->parent()) 3456 while (root->parent())
3449 root = root->parent(); 3457 root = root->parent();
3450 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3458 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3451 } 3459 }
3452 } 3460 }
3453 3461
3454 #endif 3462 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698