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

Unified Diff: third_party/WebKit/Source/core/style/ShadowData.h

Issue 2356213004: Adjust paint invalidation rects to match the actual radius of rastered blur. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('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/core/style/ShadowData.h
diff --git a/third_party/WebKit/Source/core/style/ShadowData.h b/third_party/WebKit/Source/core/style/ShadowData.h
index fa404f7c812f5ec079ac6fd40638640e469c83a1..f68a4bd4cd7f67519d5bcf2f4c47f05abcb9c039 100644
--- a/third_party/WebKit/Source/core/style/ShadowData.h
+++ b/third_party/WebKit/Source/core/style/ShadowData.h
@@ -28,6 +28,7 @@
#include "core/css/StyleColor.h"
#include "platform/geometry/FloatPoint.h"
#include "platform/geometry/FloatRectOutsets.h"
+#include "platform/graphics/skia/SkiaUtils.h"
namespace blink {
@@ -63,7 +64,9 @@ public:
// shadow.
FloatRectOutsets rectOutsets() const
{
- float blurAndSpread = blur() + spread();
+ // 3 * skBlurRadiusToSigma(blur()) is how Skia implements the radius of a blur. See also
+ // https://crbug.com/624175.
+ float blurAndSpread = ceil(3 * skBlurRadiusToSigma(blur())) + spread();
return FloatRectOutsets(
blurAndSpread - y() /* top */,
blurAndSpread + x() /* right */,
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698