зеркало из https://github.com/mozilla/moz-skia.git
Attempt at fixing color cube bench
The original bench was hitting the cache since it was using the same color filter for all loops. By creating a new color filter within the loop, at least this part of it is solved. I'm not 100% sure this is the right way, but at least the numbers are a bit more reasonable and are affected by the output resolution. BUG=skia: Review URL: https://codereview.chromium.org/648483002
This commit is contained in:
Родитель
8db6f23d90
Коммит
12b1831ea4
|
@ -94,12 +94,11 @@ private:
|
|||
}
|
||||
|
||||
void test(const int loops, SkCanvas* canvas) {
|
||||
SkAutoTUnref<SkColorFilter> colorCube(
|
||||
SkColorCubeFilter::Create(fCubeData, fCubeDimension));
|
||||
SkPaint paint;
|
||||
paint.setColorFilter(colorCube);
|
||||
|
||||
for (int i = 0; i < loops; i++) {
|
||||
SkAutoTUnref<SkColorFilter> colorCube(
|
||||
SkColorCubeFilter::Create(fCubeData, fCubeDimension));
|
||||
paint.setColorFilter(colorCube);
|
||||
canvas->drawBitmap(fBitmap, 0, 0, &paint);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче