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

Unified Diff: cc/output/filter_operations.cc

Issue 2004443002: cc: Update SpreadForStdDeviation to 3*sigma, and update tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « cc/output/filter_operation.cc ('k') | cc/output/filter_operations_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/filter_operations.cc
diff --git a/cc/output/filter_operations.cc b/cc/output/filter_operations.cc
index c5f18dec8d6557f677e8974fd8d5c56de5947585..00ec79f52c24c0d0576b94afff50cf4015b6d8d9 100644
--- a/cc/output/filter_operations.cc
+++ b/cc/output/filter_operations.cc
@@ -51,11 +51,8 @@ bool FilterOperations::IsEmpty() const {
}
static int SpreadForStdDeviation(float std_deviation) {
- // https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#feGaussianBlurElement
- // provides this approximation for evaluating a gaussian blur by a triple box
- // filter.
- float d = floorf(std_deviation * 3.f * sqrt(8.f * atan(1.f)) / 4.f + 0.5f);
- return static_cast<int>(ceilf(d * 3.f / 2.f));
+ // Corresponds to MapStdDeviation in filter_operation.cc.
+ return std_deviation * 3;
}
gfx::Rect FilterOperations::MapRect(const gfx::Rect& rect,
« no previous file with comments | « cc/output/filter_operation.cc ('k') | cc/output/filter_operations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698