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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.h

Issue 2772473003: Make PaintInvalidatorContext::geometryMapper and treeBuilderContext private (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintInvalidator.h
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.h b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
index f5fde15775c06bb95ffb2e841be262f87cafe0b9..fa3d084b171f5b0aa2e097ead2cbaedb6b38da44 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.h
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
@@ -21,30 +21,28 @@ struct PaintInvalidatorContext {
PaintInvalidatorContext(
const PaintPropertyTreeBuilderContext& treeBuilderContext,
GeometryMapper& geometryMapper)
- : treeBuilderContext(treeBuilderContext),
- geometryMapper(geometryMapper),
- parentContext(nullptr) {}
+ : parentContext(nullptr),
+ m_treeBuilderContext(treeBuilderContext),
+ m_geometryMapper(geometryMapper) {}
PaintInvalidatorContext(
const PaintPropertyTreeBuilderContext& treeBuilderContext,
const PaintInvalidatorContext& parentContext)
- : treeBuilderContext(treeBuilderContext),
- geometryMapper(parentContext.geometryMapper),
- parentContext(&parentContext),
+ : parentContext(&parentContext),
forcedSubtreeInvalidationFlags(
parentContext.forcedSubtreeInvalidationFlags),
paintInvalidationContainer(parentContext.paintInvalidationContainer),
paintInvalidationContainerForStackedContents(
parentContext.paintInvalidationContainerForStackedContents),
- paintingLayer(parentContext.paintingLayer) {}
+ paintingLayer(parentContext.paintingLayer),
+ m_treeBuilderContext(treeBuilderContext),
+ m_geometryMapper(parentContext.m_geometryMapper) {}
// This method is virtual temporarily to adapt PaintInvalidatorContext and the
// legacy PaintInvalidationState for code shared by old code and new code.
virtual void mapLocalRectToVisualRectInBacking(const LayoutObject&,
LayoutRect&) const;
- const PaintPropertyTreeBuilderContext& treeBuilderContext;
- GeometryMapper& geometryMapper;
const PaintInvalidatorContext* parentContext;
enum ForcedSubtreeInvalidationFlag {
@@ -89,6 +87,11 @@ struct PaintInvalidatorContext {
// LayoutObject::adjustVisualRectForCompositedScrolling().
LayoutPoint oldLocation;
LayoutPoint newLocation;
+
+ private:
+ friend class PaintInvalidator;
+ const PaintPropertyTreeBuilderContext& m_treeBuilderContext;
+ GeometryMapper& m_geometryMapper;
};
class PaintInvalidator {
@@ -101,6 +104,13 @@ class PaintInvalidator {
void processPendingDelayedPaintInvalidations();
private:
+ friend struct PaintInvalidatorContext;
+ template <typename Rect, typename Point>
+ static LayoutRect mapLocalRectToVisualRectInBacking(
+ const LayoutObject&,
+ const Rect&,
+ const PaintInvalidatorContext&);
+
ALWAYS_INLINE LayoutRect
computeVisualRectInBacking(const LayoutObject&,
const PaintInvalidatorContext&);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698