Index: content/test/data/media/getusermedia.html |
diff --git a/content/test/data/media/getusermedia.html b/content/test/data/media/getusermedia.html |
index e4723636005fadec7b4e39b0989a7c86778324b1..7a7868db0e33fa8b9dd786c16e6086e8e6422234 100644 |
--- a/content/test/data/media/getusermedia.html |
+++ b/content/test/data/media/getusermedia.html |
@@ -483,12 +483,14 @@ |
// Walk horizontally counting light green pixels. |
for (var x = 0; x < aperture; ++x) { |
- if (pixels.data[4 * x + 1] != COLOR_BACKGROUND_GREEN) |
+ if (Math.abs(pixels.data[4 * x + 1] - COLOR_BACKGROUND_GREEN) > |
+ COLOR_BACKGROUND_GREEN_THRESHOLD) |
phoglund_chromium
2015/10/13 08:07:01
I think you might as well inline the threshold con
emircan
2015/10/13 18:12:27
Done.
|
lightGreenPixelsX++; |
} |
// Walk vertically counting light green pixels. |
for (var y = 0; y < aperture; ++y) { |
- if (pixels.data[4 * y * aperture + 1] != COLOR_BACKGROUND_GREEN) |
+ if (Math.abs(pixels.data[4 * y * aperture + 1] - |
+ COLOR_BACKGROUND_GREEN) > COLOR_BACKGROUND_GREEN_THRESHOLD) |
lightGreenPixelsY++; |
} |
if (lightGreenPixelsX > maxLightGreenPixelsX) |