Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp |
| index 086b5b51fe0577a335892660e0d1b486135072ab..47b3f02008f846ef7a28f711d2cb40dd94451e7a 100644 |
| --- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp |
| +++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp |
| @@ -17,6 +17,7 @@ |
| #include "core/paint/PaintInvalidator.h" |
| #include "core/paint/PaintLayer.h" |
| #include "core/paint/PaintPropertyTreeBuilder.h" |
| +#include "platform/graphics/paint/GeometryMapper.h" |
| namespace blink { |
| @@ -634,9 +635,15 @@ static const PaintPropertyTreeBuilderContext& dummyTreeBuilderContext() { |
| return dummyContext; |
| } |
| +static GeometryMapper& dummyGeometryMapper() { |
|
chrishtr
2017/03/22 17:54:31
Is it somehow guaranteed that this GeometryMapper
Xianzhu
2017/03/22 18:50:02
Yes because the adapter's mapLocalRectToVisualRect
Xianzhu
2017/03/22 18:50:48
On 2017/03/22 18:50:02, Xianzhu wrote:
> On 2017/0
chrishtr
2017/03/22 18:56:21
Ok, please add a comment saying that it's guarante
Xianzhu
2017/03/22 19:20:43
Done.
|
| + DEFINE_STATIC_LOCAL(std::unique_ptr<GeometryMapper>, dummyMapper, |
| + (GeometryMapper::create())); |
|
wkorman
2017/03/22 18:33:40
We saw pdr@ recently make a perf improvement by ad
Xianzhu
2017/03/22 18:51:38
I think it's not worth it.
|
| + return *dummyMapper; |
| +} |
| + |
| PaintInvalidatorContextAdapter::PaintInvalidatorContextAdapter( |
| const PaintInvalidationState& paintInvalidationState) |
| - : PaintInvalidatorContext(dummyTreeBuilderContext()), |
| + : PaintInvalidatorContext(dummyTreeBuilderContext(), dummyGeometryMapper()), |
| m_paintInvalidationState(paintInvalidationState) { |
| forcedSubtreeInvalidationFlags = |
| paintInvalidationState.m_forcedSubtreeInvalidationFlags; |