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

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

Issue 2621483002: Skip geometry mapping when source and destination spaces are equal (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/PerformanceTests/Paint/appending-text.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b4848056059cc6f5e8c8afdf7fff07cf037851f4..190cd2d5b9d3fb8fe1a874e38a677c258efc10f7 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
@@ -14,6 +14,10 @@ FloatRect GeometryMapper::mapToVisualRectInDestinationSpace(
const PropertyTreeState& sourceState,
const PropertyTreeState& destinationState,
bool& success) {
+ if (sourceState == destinationState) {
+ success = true;
+ return rect;
+ }
FloatRect result = localToVisualRectInAncestorSpace(
rect, sourceState, destinationState, success);
if (success)
@@ -27,6 +31,10 @@ FloatRect GeometryMapper::mapRectToDestinationSpace(
const PropertyTreeState& sourceState,
const PropertyTreeState& destinationState,
bool& success) {
+ if (sourceState == destinationState) {
+ success = true;
+ return rect;
+ }
FloatRect result =
localToAncestorRect(rect, sourceState, destinationState, success);
if (success)
« no previous file with comments | « third_party/WebKit/PerformanceTests/Paint/appending-text.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698