Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 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) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 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 * | 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 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1577 // container (*not* the graphics layer that paints this object). | 1577 // container (*not* the graphics layer that paints this object). |
| 1578 LayoutRect previousVisualRectIncludingCompositedScrolling( | 1578 LayoutRect previousVisualRectIncludingCompositedScrolling( |
| 1579 const LayoutBoxModelObject& paintInvalidationContainer) const; | 1579 const LayoutBoxModelObject& paintInvalidationContainer) const; |
| 1580 | 1580 |
| 1581 // The returned rect does *not* account for composited scrolling. | 1581 // The returned rect does *not* account for composited scrolling. |
| 1582 const LayoutRect& previousVisualRect() const { return m_previousVisualRect; } | 1582 const LayoutRect& previousVisualRect() const { return m_previousVisualRect; } |
| 1583 | 1583 |
| 1584 // Called when the previous visual rect(s) is no longer valid. | 1584 // Called when the previous visual rect(s) is no longer valid. |
| 1585 virtual void clearPreviousVisualRects(); | 1585 virtual void clearPreviousVisualRects(); |
| 1586 | 1586 |
| 1587 const LayoutPoint& previousPaintOffset() const { | |
| 1588 return m_previousPaintOffset; | |
| 1589 } | |
| 1590 | |
| 1587 // Only adjusts if the paint invalidation container is not a composited | 1591 // Only adjusts if the paint invalidation container is not a composited |
| 1588 // scroller. | 1592 // scroller. |
| 1589 void adjustPreviousPaintInvalidationForScrollIfNeeded( | 1593 void adjustPreviousPaintInvalidationForScrollIfNeeded( |
| 1590 const DoubleSize& scrollDelta); | 1594 const DoubleSize& scrollDelta); |
| 1591 | 1595 |
| 1592 PaintInvalidationReason fullPaintInvalidationReason() const { | 1596 PaintInvalidationReason fullPaintInvalidationReason() const { |
| 1593 return m_bitfields.fullPaintInvalidationReason(); | 1597 return m_bitfields.fullPaintInvalidationReason(); |
| 1594 } | 1598 } |
| 1595 bool shouldDoFullPaintInvalidation() const { | 1599 bool shouldDoFullPaintInvalidation() const { |
| 1596 return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; | 1600 return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1672 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { | 1676 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { |
| 1673 m_layoutObject.setShouldDoFullPaintInvalidation(reason); | 1677 m_layoutObject.setShouldDoFullPaintInvalidation(reason); |
| 1674 } | 1678 } |
| 1675 void ensureIsReadyForPaintInvalidation() { | 1679 void ensureIsReadyForPaintInvalidation() { |
| 1676 m_layoutObject.ensureIsReadyForPaintInvalidation(); | 1680 m_layoutObject.ensureIsReadyForPaintInvalidation(); |
| 1677 } | 1681 } |
| 1678 | 1682 |
| 1679 void setPreviousVisualRect(const LayoutRect& r) { | 1683 void setPreviousVisualRect(const LayoutRect& r) { |
| 1680 m_layoutObject.setPreviousVisualRect(r); | 1684 m_layoutObject.setPreviousVisualRect(r); |
| 1681 } | 1685 } |
| 1686 void setPreviousPaintOffset(const LayoutPoint& p) { | |
| 1687 m_layoutObject.m_previousPaintOffset = p; | |
|
chrishtr
2016/11/10 18:42:00
DCHECK(slimmingPaintV2Enabled())
Xianzhu
2016/11/10 22:51:50
Added DCHECK(slimmingPaintInvalidationEnabled()).
| |
| 1688 } | |
| 1682 void setHasPreviousLocationInBacking(bool b) { | 1689 void setHasPreviousLocationInBacking(bool b) { |
| 1683 m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b); | 1690 m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b); |
| 1684 } | 1691 } |
| 1685 void setPreviousBackgroundObscured(bool b) { | 1692 void setPreviousBackgroundObscured(bool b) { |
| 1686 m_layoutObject.setPreviousBackgroundObscured(b); | 1693 m_layoutObject.setPreviousBackgroundObscured(b); |
| 1687 } | 1694 } |
| 1688 void clearPreviousVisualRects() { | 1695 void clearPreviousVisualRects() { |
| 1689 m_layoutObject.clearPreviousVisualRects(); | 1696 m_layoutObject.clearPreviousVisualRects(); |
| 1690 } | 1697 } |
| 1691 protected: | 1698 protected: |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2336 m_bitfields.setSelfNeedsOverflowRecalcAfterStyleChange(true); | 2343 m_bitfields.setSelfNeedsOverflowRecalcAfterStyleChange(true); |
| 2337 } | 2344 } |
| 2338 void setChildNeedsOverflowRecalcAfterStyleChange() { | 2345 void setChildNeedsOverflowRecalcAfterStyleChange() { |
| 2339 m_bitfields.setChildNeedsOverflowRecalcAfterStyleChange(true); | 2346 m_bitfields.setChildNeedsOverflowRecalcAfterStyleChange(true); |
| 2340 } | 2347 } |
| 2341 | 2348 |
| 2342 private: | 2349 private: |
| 2343 // Store state between styleWillChange and styleDidChange | 2350 // Store state between styleWillChange and styleDidChange |
| 2344 static bool s_affectsParentBlock; | 2351 static bool s_affectsParentBlock; |
| 2345 | 2352 |
| 2346 // This stores the visual rect from the previous frame. This rect does *not* | 2353 // This stores the visual rect computed by the latest paint invalidation. |
| 2347 // account for composited scrolling. See | 2354 // This rect does *not* account for composited scrolling. See |
| 2348 // adjustVisualRectForCompositedScrolling(). | 2355 // adjustVisualRectForCompositedScrolling(). |
| 2349 LayoutRect m_previousVisualRect; | 2356 LayoutRect m_previousVisualRect; |
| 2357 | |
| 2358 // This stores the paint offset computed by the latest paint property tree | |
| 2359 // building. It is relative to the containing transform space. It is the same | |
| 2360 // offset that will be used to paint the object on SPv2. | |
| 2361 LayoutPoint m_previousPaintOffset; | |
| 2350 }; | 2362 }; |
| 2351 | 2363 |
| 2352 // FIXME: remove this once the layout object lifecycle ASSERTS are no longer | 2364 // FIXME: remove this once the layout object lifecycle ASSERTS are no longer |
| 2353 // hit. | 2365 // hit. |
| 2354 class DeprecatedDisableModifyLayoutTreeStructureAsserts { | 2366 class DeprecatedDisableModifyLayoutTreeStructureAsserts { |
| 2355 STACK_ALLOCATED(); | 2367 STACK_ALLOCATED(); |
| 2356 WTF_MAKE_NONCOPYABLE(DeprecatedDisableModifyLayoutTreeStructureAsserts); | 2368 WTF_MAKE_NONCOPYABLE(DeprecatedDisableModifyLayoutTreeStructureAsserts); |
| 2357 | 2369 |
| 2358 public: | 2370 public: |
| 2359 DeprecatedDisableModifyLayoutTreeStructureAsserts(); | 2371 DeprecatedDisableModifyLayoutTreeStructureAsserts(); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2561 CORE_EXPORT void showLineTree(const blink::LayoutObject*); | 2573 CORE_EXPORT void showLineTree(const blink::LayoutObject*); |
| 2562 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); | 2574 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); |
| 2563 // We don't make object2 an optional parameter so that showLayoutTree | 2575 // We don't make object2 an optional parameter so that showLayoutTree |
| 2564 // can be called from gdb easily. | 2576 // can be called from gdb easily. |
| 2565 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, | 2577 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, |
| 2566 const blink::LayoutObject* object2); | 2578 const blink::LayoutObject* object2); |
| 2567 | 2579 |
| 2568 #endif | 2580 #endif |
| 2569 | 2581 |
| 2570 #endif // LayoutObject_h | 2582 #endif // LayoutObject_h |
| OLD | NEW |