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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp

Issue 2699593006: Refactor to remove need for infiniteIntRect when computing rects in pre-paint (Closed)
Patch Set: none Created 3 years, 10 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/platform/graphics/paint/GeometryMapper.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
index a74c867ffc6eaaace6ce935649e77d98b15cbdac..00d8f6f89aefaff65351bbac09b79cef93242cba 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
@@ -149,12 +149,14 @@ FloatClipRect GeometryMapper::slowLocalToAncestorVisualRectWithEffects(
success);
hasRadius |= result.hasRadius();
if (!success) {
- result.setHasRadius(hasRadius);
+ if (hasRadius)
+ result.setHasRadius();
return result;
}
result = effect->mapRect(result.rect());
- result.setHasRadius(hasRadius);
+ if (hasRadius)
+ result.setHasRadius();
lastTransformAndClipState = transformAndClipState;
}
@@ -164,7 +166,8 @@ FloatClipRect GeometryMapper::slowLocalToAncestorVisualRectWithEffects(
result = sourceToDestinationVisualRectInternal(
result.rect(), lastTransformAndClipState, finalTransformAndClipState,
success);
- result.setHasRadius(hasRadius || result.hasRadius());
+ if (hasRadius || result.hasRadius())
+ result.setHasRadius();
return result;
}
@@ -348,7 +351,7 @@ FloatClipRect GeometryMapper::localToAncestorClipRectInternal(
FloatRect mappedRect = transformMatrix.mapRect((*it)->clipRect().rect());
clip.intersect(mappedRect);
if ((*it)->clipRect().isRounded())
- clip.setHasRadius(true);
+ clip.setHasRadius();
clipCache.set(*it, clip);
}

Powered by Google App Engine
This is Rietveld 408576698