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

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

Issue 2449953005: [SPInvalidation] Handle pixel-snapping of paint invalidation rects (Closed)
Patch Set: PaintInvalidationRectInBacking struct Created 4 years, 2 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
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 68c7e5aa0312ec396be16cb188cd2ba363912e4a..33404f1112d704b7a1895b628afdcbc9c2f5030a 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.h
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
@@ -17,6 +17,13 @@ class LayoutObject;
class PaintLayer;
struct PaintPropertyTreeBuilderContext;
+struct PaintInvalidationRectInBacking {
+ LayoutRect rect;
+ // True if the rect have been expanded to whole pixels or be rotated, skewed,
+ // etc., so covers more pixels than the object covers.
+ bool coversExtraPixels = false;
+};
+
struct PaintInvalidatorContext {
PaintInvalidatorContext(
const PaintPropertyTreeBuilderContext& treeBuilderContext)
@@ -68,8 +75,8 @@ struct PaintInvalidatorContext {
PaintLayer* paintingLayer = nullptr;
- LayoutRect oldBounds;
- LayoutRect newBounds;
+ PaintInvalidationRectInBacking oldBounds;
+ PaintInvalidationRectInBacking newBounds;
LayoutPoint oldLocation;
LayoutPoint newLocation;
};
@@ -84,11 +91,11 @@ class PaintInvalidator {
void processPendingDelayedPaintInvalidations();
private:
- LayoutRect mapLocalRectToPaintInvalidationBacking(
+ PaintInvalidationRectInBacking mapLocalRectToPaintInvalidationBacking(
const LayoutObject&,
const FloatRect&,
const PaintInvalidatorContext&);
- LayoutRect computePaintInvalidationRectInBacking(
+ PaintInvalidationRectInBacking computePaintInvalidationRectInBacking(
const LayoutObject&,
const PaintInvalidatorContext&);
LayoutPoint computeLocationFromPaintInvalidationBacking(

Powered by Google App Engine
This is Rietveld 408576698