Commit a9dbc776 authored by David Bertoni's avatar David Bertoni Committed by Commit Bot

[Extensions] Reduce the visible pixels percentage for the old function.

We are currently collecting stats for the old and new analysis
functions. Keeping the percentage of visible pixels required will
allow us to keep comparing these numbers.

Bug: 805600
Change-Id: I5d7e9c800c2e6f7bab5f92b081624b796b18b4f3
Reviewed-on: https://chromium-review.googlesource.com/c/1448791Reviewed-by: default avatarKaran Bhatia <karandeepb@chromium.org>
Commit-Queue: David Bertoni <dbertoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628415}
parent 15b2403b
...@@ -180,7 +180,7 @@ bool IsIconSufficientlyVisible(const SkBitmap& bitmap) { ...@@ -180,7 +180,7 @@ bool IsIconSufficientlyVisible(const SkBitmap& bitmap) {
constexpr unsigned int kAlphaThreshold = 10; constexpr unsigned int kAlphaThreshold = 10;
// The minimum "percent" of pixels that must be visible for the icon to be // The minimum "percent" of pixels that must be visible for the icon to be
// considered OK. // considered OK.
constexpr double kMinPercentVisiblePixels = 0.05; constexpr double kMinPercentVisiblePixels = 0.03;
const int total_pixels = bitmap.height() * bitmap.width(); const int total_pixels = bitmap.height() * bitmap.width();
// Pre-calculate the minimum number of visible pixels so we can exit early. // Pre-calculate the minimum number of visible pixels so we can exit early.
// Since we expect most icons to be visible, this will perform better for // Since we expect most icons to be visible, this will perform better for
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment