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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp

Issue 2292273003: Define contentsProperties on ObjectPaintProperties, for use in paint invalidation. (Closed)
Patch Set: none Created 4 years, 3 months 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 // 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 #include "core/paint/PaintInvalidator.h" 5 #include "core/paint/PaintInvalidator.h"
6 6
7 #include "core/editing/FrameSelection.h" 7 #include "core/editing/FrameSelection.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 19 matching lines...) Expand all
30 toLayoutBox(object).flipForWritingMode(rect); 30 toLayoutBox(object).flipForWritingMode(rect);
31 31
32 LayoutRect result; 32 LayoutRect result;
33 if (object == context.paintInvalidationContainer) { 33 if (object == context.paintInvalidationContainer) {
34 result = LayoutRect(rect); 34 result = LayoutRect(rect);
35 } else { 35 } else {
36 rect.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset)); 36 rect.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset));
37 37
38 bool success = false; 38 bool success = false;
39 PropertyTreeState currentTreeState(context.treeBuilderContext.current.tr ansform, context.treeBuilderContext.current.clip, context.treeBuilderContext.cur rentEffect); 39 PropertyTreeState currentTreeState(context.treeBuilderContext.current.tr ansform, context.treeBuilderContext.current.clip, context.treeBuilderContext.cur rentEffect);
40 const PropertyTreeState& containerTreeState = context.paintInvalidationC ontainer->objectPaintProperties()->localBorderBoxProperties()->propertyTreeState ; 40 PropertyTreeState containerTreeState = context.paintInvalidationContaine r->objectPaintProperties()->contentsProperties();
41 result = LayoutRect(geometryMapper.mapToVisualRectInDestinationSpace(rec t, currentTreeState, containerTreeState, success)); 41 result = LayoutRect(geometryMapper.mapToVisualRectInDestinationSpace(rec t, currentTreeState, containerTreeState, success));
42 DCHECK(success); 42 DCHECK(success);
43 } 43 }
44 44
45 if (context.paintInvalidationContainer->layer()->groupedMapping()) 45 if (context.paintInvalidationContainer->layer()->groupedMapping())
46 PaintLayer::mapRectInPaintInvalidationContainerToBacking(*context.paintI nvalidationContainer, result); 46 PaintLayer::mapRectInPaintInvalidationContainerToBacking(*context.paintI nvalidationContainer, result);
47 return result; 47 return result;
48 } 48 }
49 49
50 void PaintInvalidatorContext::mapLocalRectToPaintInvalidationBacking(const Layou tObject& object, LayoutRect& rect) const 50 void PaintInvalidatorContext::mapLocalRectToPaintInvalidationBacking(const Layou tObject& object, LayoutRect& rect) const
(...skipping 19 matching lines...) Expand all
70 } 70 }
71 71
72 LayoutPoint PaintInvalidator::computeLocationFromPaintInvalidationBacking(const LayoutObject& object, const PaintInvalidatorContext& context) 72 LayoutPoint PaintInvalidator::computeLocationFromPaintInvalidationBacking(const LayoutObject& object, const PaintInvalidatorContext& context)
73 { 73 {
74 FloatPoint point; 74 FloatPoint point;
75 if (object != context.paintInvalidationContainer) { 75 if (object != context.paintInvalidationContainer) {
76 point.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset)) ; 76 point.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset)) ;
77 77
78 bool success = false; 78 bool success = false;
79 PropertyTreeState currentTreeState(context.treeBuilderContext.current.tr ansform, context.treeBuilderContext.current.clip, context.treeBuilderContext.cur rentEffect); 79 PropertyTreeState currentTreeState(context.treeBuilderContext.current.tr ansform, context.treeBuilderContext.current.clip, context.treeBuilderContext.cur rentEffect);
80 const PropertyTreeState& containerTreeState = context.paintInvalidationC ontainer->objectPaintProperties()->localBorderBoxProperties()->propertyTreeState ; 80 PropertyTreeState containerTreeState = context.paintInvalidationContaine r->objectPaintProperties()->contentsProperties();
81 point = m_geometryMapper.mapRectToDestinationSpace(FloatRect(point, Floa tSize()), currentTreeState, containerTreeState, success).location(); 81 point = m_geometryMapper.mapRectToDestinationSpace(FloatRect(point, Floa tSize()), currentTreeState, containerTreeState, success).location();
82 DCHECK(success); 82 DCHECK(success);
83 } 83 }
84 84
85 if (context.paintInvalidationContainer->layer()->groupedMapping()) 85 if (context.paintInvalidationContainer->layer()->groupedMapping())
86 PaintLayer::mapPointInPaintInvalidationContainerToBacking(*context.paint InvalidationContainer, point); 86 PaintLayer::mapPointInPaintInvalidationContainerToBacking(*context.paint InvalidationContainer, point);
87 87
88 return LayoutPoint(point); 88 return LayoutPoint(point);
89 } 89 }
90 90
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 object.getMutableForPainting().clearPaintInvalidationFlags(); 232 object.getMutableForPainting().clearPaintInvalidationFlags();
233 } 233 }
234 234
235 void PaintInvalidator::processPendingDelayedPaintInvalidations() 235 void PaintInvalidator::processPendingDelayedPaintInvalidations()
236 { 236 {
237 for (auto target : m_pendingDelayedPaintInvalidations) 237 for (auto target : m_pendingDelayedPaintInvalidations)
238 target->getMutableForPainting().setShouldDoFullPaintInvalidation(PaintIn validationDelayedFull); 238 target->getMutableForPainting().setShouldDoFullPaintInvalidation(PaintIn validationDelayedFull);
239 } 239 }
240 240
241 } // namespace blink 241 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698