SkMipMap::ComputeLevelSize should only cover SkMipMap's levels.
authorcblume <cblume@chromium.org>
Thu, 9 Jun 2016 16:44:33 +0000 (09:44 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 9 Jun 2016 16:44:33 +0000 (09:44 -0700)
commit609623b47f5722a4d3a4dbb5103736fe70ae1878
tree842b51269c72bc2bb5bbb70f8708209e6dccb4e6
parent97e398d98928f9497063594ebe633efe2d0f4968
SkMipMap::ComputeLevelSize should only cover SkMipMap's levels.

SkMipMap only deals with the levels it generates.
That is to day, it deals with mipmap levels 1-x, not 0-x.
Other functions reflect thing when indexing.
They go from 0 to x-1 (giving the index into SkMipMap's contents).

ComputeLevelSize should also follow that same indexing.

BUG=578304
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2042843005

Review-Url: https://codereview.chromium.org/2042843005
src/core/SkMipMap.cpp
src/core/SkMipMap.h
tests/MipMapTest.cpp