git-svn-id: http://skia.googlecode.com/svn/trunk@7826 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2013-02-22 16:07:59 +00:00
Родитель ad51132b1b
Коммит cd7421bf38
1 изменённых файлов: 11 добавлений и 10 удалений

Просмотреть файл

@ -94,6 +94,8 @@ public:
ChartBench(void* param, bool aa) : SkBenchmark(param) { ChartBench(void* param, bool aa) : SkBenchmark(param) {
fShift = 0; fShift = 0;
fAA = aa; fAA = aa;
fSize.fWidth = -1;
fSize.fHeight = -1;
} }
protected: protected:
@ -115,8 +117,6 @@ protected:
SkScalar ySpread = SkIntToScalar(fSize.fHeight / 20); SkScalar ySpread = SkIntToScalar(fSize.fHeight / 20);
SkScalar height = SkIntToScalar(fSize.fHeight); SkScalar height = SkIntToScalar(fSize.fHeight);
for (int frame = 0; frame < kFramesPerRun; ++frame) {
if (sizeChanged) { if (sizeChanged) {
int dataPointCount = SkMax32(fSize.fWidth / kPixelsPerTick + 1, 2); int dataPointCount = SkMax32(fSize.fWidth / kPixelsPerTick + 1, 2);
@ -125,9 +125,10 @@ protected:
fData[i].reset(); fData[i].reset();
gen_data(y, ySpread, dataPointCount, fData + i); gen_data(y, ySpread, dataPointCount, fData + i);
} }
sizeChanged = false;
} }
for (int frame = 0; frame < kFramesPerRun; ++frame) {
canvas->clear(0xFFE0F0E0); canvas->clear(0xFFE0F0E0);
static SkMWCRandom colorRand; static SkMWCRandom colorRand;