diff options
author | Feng Qian <fqian@google.com> | 2009-06-18 18:20:56 -0700 |
---|---|---|
committer | Feng Qian <fqian@google.com> | 2009-06-18 18:20:56 -0700 |
commit | 1edef79f87f9c52c21d69c87c19f8e2b140a9119 (patch) | |
tree | cad337ef493b0d9710bf3ae478cb87cb534f598d /WebCore/platform/graphics/skia/GradientSkia.cpp | |
parent | b83fc086000e27bc227580bd0e35b9d7bee1179a (diff) | |
parent | c9c4d65c1547996ed3748026904d6e7f09aec2b4 (diff) | |
download | external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.zip external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.tar.gz external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.tar.bz2 |
Merge commit 'goog/master-webkit-merge' into webkit-merge-44544
Diffstat (limited to 'WebCore/platform/graphics/skia/GradientSkia.cpp')
-rw-r--r-- | WebCore/platform/graphics/skia/GradientSkia.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/skia/GradientSkia.cpp b/WebCore/platform/graphics/skia/GradientSkia.cpp index 2d2000c..ac7366c 100644 --- a/WebCore/platform/graphics/skia/GradientSkia.cpp +++ b/WebCore/platform/graphics/skia/GradientSkia.cpp @@ -60,12 +60,14 @@ static SkColor makeSkColor(float a, float r, float g, float b) // ends as necessary. static size_t totalStopsNeeded(const Gradient::ColorStop* stopData, size_t count) { + // N.B.: The tests in this function should kept in sync with the ones in + // fillStops(), or badness happens. const Gradient::ColorStop* stop = stopData; size_t countUsed = count; if (count < 1 || stop->stop > 0.0) countUsed++; stop += count - 1; - if (count < 2 || stop->stop < 1.0) + if (count < 1 || stop->stop < 1.0) countUsed++; return countUsed; } |