Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef PaintInvalidator_h | 5 #ifndef PaintInvalidator_h |
| 6 #define PaintInvalidator_h | 6 #define PaintInvalidator_h |
| 7 | 7 |
| 8 #include "platform/geometry/LayoutRect.h" | 8 #include "platform/geometry/LayoutRect.h" |
| 9 #include "platform/graphics/paint/GeometryMapper.h" | 9 #include "platform/graphics/paint/GeometryMapper.h" |
| 10 #include "wtf/Vector.h" | 10 #include "wtf/Vector.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 // stacked contents' paint invalidation containers differ. | 65 // stacked contents' paint invalidation containers differ. |
| 66 const LayoutBoxModelObject* paintInvalidationContainerForStackedContents = | 66 const LayoutBoxModelObject* paintInvalidationContainerForStackedContents = |
| 67 nullptr; | 67 nullptr; |
| 68 | 68 |
| 69 PaintLayer* paintingLayer = nullptr; | 69 PaintLayer* paintingLayer = nullptr; |
| 70 | 70 |
| 71 LayoutRect oldBounds; | 71 LayoutRect oldBounds; |
| 72 LayoutRect newBounds; | 72 LayoutRect newBounds; |
| 73 LayoutPoint oldLocation; | 73 LayoutPoint oldLocation; |
| 74 LayoutPoint newLocation; | 74 LayoutPoint newLocation; |
| 75 bool oldBoundsCoversExtraPixels = false; | |
| 76 bool newBoundsCoversExtraPixels = false; | |
| 75 }; | 77 }; |
| 76 | 78 |
| 77 class PaintInvalidator { | 79 class PaintInvalidator { |
| 78 public: | 80 public: |
| 79 void invalidatePaintIfNeeded(FrameView&, PaintInvalidatorContext&); | 81 void invalidatePaintIfNeeded(FrameView&, PaintInvalidatorContext&); |
| 80 void invalidatePaintIfNeeded(const LayoutObject&, PaintInvalidatorContext&); | 82 void invalidatePaintIfNeeded(const LayoutObject&, PaintInvalidatorContext&); |
| 81 | 83 |
| 82 // Process objects needing paint invalidation on the next frame. | 84 // Process objects needing paint invalidation on the next frame. |
| 83 // See the definition of PaintInvalidationDelayedFull for more details. | 85 // See the definition of PaintInvalidationDelayedFull for more details. |
| 84 void processPendingDelayedPaintInvalidations(); | 86 void processPendingDelayedPaintInvalidations(); |
| 85 | 87 |
| 86 private: | 88 private: |
| 87 LayoutRect mapLocalRectToPaintInvalidationBacking( | 89 LayoutRect mapLocalRectToPaintInvalidationBacking( |
| 88 const LayoutObject&, | 90 const LayoutObject&, |
| 89 const FloatRect&, | 91 const FloatRect&, |
| 90 const PaintInvalidatorContext&); | 92 const PaintInvalidatorContext&, |
| 93 bool& coversExtraPixels); | |
| 91 LayoutRect computePaintInvalidationRectInBacking( | 94 LayoutRect computePaintInvalidationRectInBacking( |
|
pdr.
2016/10/26 05:25:12
Returning through both a return value and an out-p
Xianzhu
2016/10/26 18:32:31
Done.
| |
| 92 const LayoutObject&, | 95 const LayoutObject&, |
| 93 const PaintInvalidatorContext&); | 96 const PaintInvalidatorContext&, |
| 97 bool& coversExtraPixels); | |
| 94 LayoutPoint computeLocationFromPaintInvalidationBacking( | 98 LayoutPoint computeLocationFromPaintInvalidationBacking( |
| 95 const LayoutObject&, | 99 const LayoutObject&, |
| 96 const PaintInvalidatorContext&); | 100 const PaintInvalidatorContext&); |
| 97 void updatePaintingLayer(const LayoutObject&, PaintInvalidatorContext&); | 101 void updatePaintingLayer(const LayoutObject&, PaintInvalidatorContext&); |
| 98 void updateContext(const LayoutObject&, PaintInvalidatorContext&); | 102 void updateContext(const LayoutObject&, PaintInvalidatorContext&); |
| 99 | 103 |
| 100 Vector<const LayoutObject*> m_pendingDelayedPaintInvalidations; | 104 Vector<const LayoutObject*> m_pendingDelayedPaintInvalidations; |
| 101 GeometryMapper m_geometryMapper; | 105 GeometryMapper m_geometryMapper; |
| 102 }; | 106 }; |
| 103 | 107 |
| 104 } // namespace blink | 108 } // namespace blink |
| 105 | 109 |
| 106 #endif // PaintInvalidator_h | 110 #endif // PaintInvalidator_h |
| OLD | NEW |