| Index: src/utils/SkLua.cpp
|
| diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp
|
| index e6d5d4c5ffa10145e5b3be7baa39385eb65a03e2..2429d9934f39c8d20a92ea61e07c96f7616bd58f 100644
|
| --- a/src/utils/SkLua.cpp
|
| +++ b/src/utils/SkLua.cpp
|
| @@ -1275,11 +1275,11 @@ static int lshader_asAGradient(lua_State* L) {
|
| info.fColorOffsets = pos.get();
|
| shader->asAGradient(&info);
|
|
|
| - bool containsHardStops = false;
|
| - bool isEvenlySpaced = true;
|
| + int numHardStops = 0;
|
| + bool isEvenlySpaced = true;
|
| for (int i = 1; i < info.fColorCount; i++) {
|
| if (SkScalarNearlyEqual(info.fColorOffsets[i], info.fColorOffsets[i-1])) {
|
| - containsHardStops = true;
|
| + numHardStops++;
|
| }
|
| if (!SkScalarNearlyEqual(info.fColorOffsets[i], i/(info.fColorCount - 1.0f))) {
|
| isEvenlySpaced = false;
|
| @@ -1287,11 +1287,11 @@ static int lshader_asAGradient(lua_State* L) {
|
| }
|
|
|
| lua_newtable(L);
|
| - setfield_string(L, "type", gradtype2string(t));
|
| - setfield_string(L, "tile", mode2string(info.fTileMode));
|
| - setfield_number(L, "colorCount", info.fColorCount);
|
| - setfield_boolean(L, "containsHardStops", containsHardStops);
|
| - setfield_boolean(L, "isEvenlySpaced", isEvenlySpaced);
|
| + setfield_string(L, "type", gradtype2string(t));
|
| + setfield_string(L, "tile", mode2string(info.fTileMode));
|
| + setfield_number(L, "colorCount", info.fColorCount);
|
| + setfield_number(L, "numHardStops", numHardStops);
|
| + setfield_boolean(L, "isEvenlySpaced", isEvenlySpaced);
|
|
|
| lua_newtable(L);
|
| for (int i = 0; i < info.fColorCount; i++) {
|
|
|