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

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

Issue 395463003: Invalidate previous paint rect in RenderObject::paintInvalidationForWholeRenderer() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « LayoutTests/fast/repaint/remove-after-layout-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 1526
1527 if (view()->document().printing()) 1527 if (view()->document().printing())
1528 return; // Don't invalidate paints if we're printing. 1528 return; // Don't invalidate paints if we're printing.
1529 1529
1530 // FIXME: really, we're in the paint invalidation phase here, and the follow ing queries are legal. 1530 // FIXME: really, we're in the paint invalidation phase here, and the follow ing queries are legal.
1531 // Until those states are fully fledged, I'll just disable the ASSERTS. 1531 // Until those states are fully fledged, I'll just disable the ASSERTS.
1532 DisableCompositingQueryAsserts disabler; 1532 DisableCompositingQueryAsserts disabler;
1533 const RenderLayerModelObject* paintInvalidationContainer = containerForPaint Invalidation(); 1533 const RenderLayerModelObject* paintInvalidationContainer = containerForPaint Invalidation();
1534 LayoutRect paintInvalidationRect = boundsRectForPaintInvalidation(paintInval idationContainer); 1534 LayoutRect paintInvalidationRect = boundsRectForPaintInvalidation(paintInval idationContainer);
1535 invalidatePaintUsingContainer(paintInvalidationContainer, paintInvalidationR ect, InvalidationPaint); 1535 invalidatePaintUsingContainer(paintInvalidationContainer, paintInvalidationR ect, InvalidationPaint);
1536 if (paintInvalidationRect != previousPaintInvalidationRect())
1537 invalidatePaintUsingContainer(paintInvalidationContainer, previousPaintI nvalidationRect(), InvalidationPaint);
Julien - ping for review 2014/07/15 00:58:31 I think we should only invalidate the previousPain
Xianzhu 2014/07/15 01:16:24 I tried that but layout test results showed under-
1536 } 1538 }
1537 1539
1538 LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelOb ject* paintInvalidationContainer) const 1540 LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelOb ject* paintInvalidationContainer) const
1539 { 1541 {
1540 if (!paintInvalidationContainer) 1542 if (!paintInvalidationContainer)
1541 return computePaintInvalidationRect(paintInvalidationContainer); 1543 return computePaintInvalidationRect(paintInvalidationContainer);
1542 return RenderLayer::computePaintInvalidationRect(this, paintInvalidationCont ainer->layer()); 1544 return RenderLayer::computePaintInvalidationRect(this, paintInvalidationCont ainer->layer());
1543 } 1545 }
1544 1546
1545 void RenderObject::invalidatePaintRectangle(const LayoutRect& r) const 1547 void RenderObject::invalidatePaintRectangle(const LayoutRect& r) const
(...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after
3445 { 3447 {
3446 if (object1) { 3448 if (object1) {
3447 const WebCore::RenderObject* root = object1; 3449 const WebCore::RenderObject* root = object1;
3448 while (root->parent()) 3450 while (root->parent())
3449 root = root->parent(); 3451 root = root->parent();
3450 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3452 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3451 } 3453 }
3452 } 3454 }
3453 3455
3454 #endif 3456 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/repaint/remove-after-layout-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698