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

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

Issue 2495893002: Implement incremental paint property tree rebuilding (Closed)
Patch Set: Suppress main thread scrolling invalidation failures Created 4 years, 1 month 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 /* 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. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 // Text nodes share style with their parents but the checked styles don't 1462 // Text nodes share style with their parents but the checked styles don't
1463 // apply to them, hence the !isText() check. 1463 // apply to them, hence the !isText() check.
1464 if (!isText() && (diff.transformChanged() || diff.opacityChanged() || 1464 if (!isText() && (diff.transformChanged() || diff.opacityChanged() ||
1465 diff.zIndexChanged() || diff.filterChanged() || 1465 diff.zIndexChanged() || diff.filterChanged() ||
1466 diff.backdropFilterChanged())) { 1466 diff.backdropFilterChanged())) {
1467 // We don't need to invalidate paint of objects on SPv2 when only paint 1467 // We don't need to invalidate paint of objects on SPv2 when only paint
1468 // property or paint order change. Mark the painting layer needing repaint 1468 // property or paint order change. Mark the painting layer needing repaint
1469 // for changed paint property or paint order. Raster invalidation will be 1469 // for changed paint property or paint order. Raster invalidation will be
1470 // issued if needed during paint. 1470 // issued if needed during paint.
1471 ObjectPaintInvalidator(*this).slowSetPaintingLayerNeedsRepaint(); 1471 ObjectPaintInvalidator(*this).slowSetPaintingLayerNeedsRepaint();
1472
1473 // When transform, opacity, etc. change, paint properties will also change
1474 // so we need to mark this object as needing an update.
1475 // TODO(pdr): Also update in the non-spv2 codepath?
1476 getMutableForPainting().setNeedsPaintPropertyUpdate();
1472 } 1477 }
1473 } else { 1478 } else {
1474 // If transform changed, and the layer does not paint into its own separate 1479 // If transform changed, and the layer does not paint into its own separate
1475 // backing, then we need to invalidate paints. 1480 // backing, then we need to invalidate paints.
1476 if (diff.transformChanged()) { 1481 if (diff.transformChanged()) {
1477 // Text nodes share style with their parents but transforms don't apply to 1482 // Text nodes share style with their parents but transforms don't apply to
1478 // them, hence the !isText() check. 1483 // them, hence the !isText() check.
1479 if (!isText() && (!hasLayer() || 1484 if (!isText() && (!hasLayer() ||
1480 !toLayoutBoxModelObject(this) 1485 !toLayoutBoxModelObject(this)
1481 ->layer() 1486 ->layer()
(...skipping 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after
3534 const blink::LayoutObject* root = object1; 3539 const blink::LayoutObject* root = object1;
3535 while (root->parent()) 3540 while (root->parent())
3536 root = root->parent(); 3541 root = root->parent();
3537 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3542 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3538 } else { 3543 } else {
3539 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3544 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3540 } 3545 }
3541 } 3546 }
3542 3547
3543 #endif 3548 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/paint/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698