 Chromium Code Reviews
 Chromium Code Reviews Issue 2380683006:
  SPv2: Add support for tracking raster paint invalidations in testing.  (Closed)
    
  
    Issue 2380683006:
  SPv2: Add support for tracking raster paint invalidations in testing.  (Closed) 
  | OLD | NEW | 
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 PaintChunk_h | 5 #ifndef PaintChunk_h | 
| 6 #define PaintChunk_h | 6 #define PaintChunk_h | 
| 7 | 7 | 
| 8 #include "platform/geometry/FloatRect.h" | 8 #include "platform/geometry/FloatRect.h" | 
| 9 #include "platform/graphics/paint/DisplayItem.h" | 9 #include "platform/graphics/paint/DisplayItem.h" | 
| 10 #include "platform/graphics/paint/PaintChunkProperties.h" | 10 #include "platform/graphics/paint/PaintChunkProperties.h" | 
| 11 #include "platform/graphics/paint/PaintInvalidationTracking.h" | |
| 11 #include "wtf/Allocator.h" | 12 #include "wtf/Allocator.h" | 
| 12 #include "wtf/Optional.h" | 13 #include "wtf/Optional.h" | 
| 13 #include "wtf/Vector.h" | 14 #include "wtf/Vector.h" | 
| 14 #include <iosfwd> | 15 #include <iosfwd> | 
| 15 | 16 | 
| 16 namespace blink { | 17 namespace blink { | 
| 17 | 18 | 
| 18 // A contiguous sequence of drawings with common paint properties. | 19 // A contiguous sequence of drawings with common paint properties. | 
| 19 // | 20 // | 
| 20 // This is expected to be owned by the paint artifact which also owns the | 21 // This is expected to be owned by the paint artifact which also owns the | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 | 77 | 
| 77 // The total bounds of this paint chunk's contents, in -the coordinate space of | 78 // The total bounds of this paint chunk's contents, in -the coordinate space of | 
| 78 // the containing transform node. | 79 // the containing transform node. | 
| 79 FloatRect bounds; | 80 FloatRect bounds; | 
| 80 | 81 | 
| 81 // True if the bounds are filled entirely with opaque contents. | 82 // True if the bounds are filled entirely with opaque contents. | 
| 82 bool knownToBeOpaque; | 83 bool knownToBeOpaque; | 
| 83 | 84 | 
| 84 // SPv2 only. Rectangles that need to be re-rasterized in this chunk, in the | 85 // SPv2 only. Rectangles that need to be re-rasterized in this chunk, in the | 
| 85 // coordinate space of the containing transform node. | 86 // coordinate space of the containing transform node. | 
| 86 Vector<FloatRect> rasterInvalidationRects; | 87 Vector<PaintInvalidationInfo> rasterInvalidationRects; | 
| 
Xianzhu
2016/09/30 00:47:00
I suggest to keep this to still contain FloatRect,
 
chrishtr
2016/09/30 18:19:10
Done.
 | |
| 87 }; | 88 }; | 
| 88 | 89 | 
| 89 inline bool operator==(const PaintChunk& a, const PaintChunk& b) | 90 inline bool operator==(const PaintChunk& a, const PaintChunk& b) | 
| 90 { | 91 { | 
| 91 return a.beginIndex == b.beginIndex | 92 return a.beginIndex == b.beginIndex | 
| 92 && a.endIndex == b.endIndex | 93 && a.endIndex == b.endIndex | 
| 93 && a.id == b.id | 94 && a.id == b.id | 
| 94 && a.properties == b.properties | 95 && a.properties == b.properties | 
| 95 && a.bounds == b.bounds | 96 && a.bounds == b.bounds | 
| 96 && a.knownToBeOpaque == b.knownToBeOpaque | 97 && a.knownToBeOpaque == b.knownToBeOpaque | 
| (...skipping 22 matching lines...) Expand all Loading... | |
| 119 return findChunkInVectorByDisplayItemIndex(const_cast<Vector<PaintChunk>&>(c hunks), index); | 120 return findChunkInVectorByDisplayItemIndex(const_cast<Vector<PaintChunk>&>(c hunks), index); | 
| 120 } | 121 } | 
| 121 | 122 | 
| 122 // Redeclared here to avoid ODR issues. | 123 // Redeclared here to avoid ODR issues. | 
| 123 // See platform/testing/PaintPrinters.h. | 124 // See platform/testing/PaintPrinters.h. | 
| 124 void PrintTo(const PaintChunk&, std::ostream*); | 125 void PrintTo(const PaintChunk&, std::ostream*); | 
| 125 | 126 | 
| 126 } // namespace blink | 127 } // namespace blink | 
| 127 | 128 | 
| 128 #endif // PaintChunk_h | 129 #endif // PaintChunk_h | 
| OLD | NEW |