зеркало из https://github.com/mozilla/moz-skia.git
save/restore the canvas around every bench draw call
BUG= R=djsollen@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/26848013 git-svn-id: http://skia.googlecode.com/svn/trunk@11728 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
b4227d20b9
Коммит
f8a6b20e76
|
@ -363,7 +363,6 @@ DEF_BENCH( return new BitmapBench(true, SkBitmap::kIndex8_Config); )
|
|||
DEF_BENCH( return new BitmapBench(true, SkBitmap::kARGB_8888_Config, true, true); )
|
||||
DEF_BENCH( return new BitmapBench(true, SkBitmap::kARGB_8888_Config, true, false); )
|
||||
|
||||
/* TODO(mtklein): figure out why these are broken (suspect caching is interfering) and restore
|
||||
// scale filter -> S32_opaque_D32_filter_DX_{SSE2,SSSE3} and Fact9 is also for S32_D16_filter_DX_SSE2
|
||||
DEF_BENCH( return new FilterBitmapBench(false, SkBitmap::kARGB_8888_Config, false, false, kScale_Flag | kBilerp_Flag); )
|
||||
DEF_BENCH( return new FilterBitmapBench(true, SkBitmap::kARGB_8888_Config, false, false, kScale_Flag | kBilerp_Flag); )
|
||||
|
@ -378,7 +377,6 @@ DEF_BENCH( return new FilterBitmapBench(true, SkBitmap::kARGB_8888_Config, true,
|
|||
|
||||
DEF_BENCH( return new FilterBitmapBench(false, SkBitmap::kARGB_8888_Config, false, false, kScale_Flag | kBilerp_Flag | kBicubic_Flag); )
|
||||
DEF_BENCH( return new FilterBitmapBench(false, SkBitmap::kARGB_8888_Config, false, false, kScale_Flag | kRotate_Flag | kBilerp_Flag | kBicubic_Flag); )
|
||||
*/
|
||||
|
||||
// source alpha tests -> S32A_Opaque_BlitRow32_{arm,neon}
|
||||
DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kOpaque_SourceAlpha, SkBitmap::kARGB_8888_Config); )
|
||||
|
|
|
@ -593,15 +593,14 @@ int tool_main(int argc, char** argv) {
|
|||
}
|
||||
|
||||
timer.start();
|
||||
if (NULL != canvas) {
|
||||
canvas->save();
|
||||
}
|
||||
|
||||
// Inner loop that allows us to break the run into smaller
|
||||
// chunks (e.g. frames). This is especially useful for the GPU
|
||||
// as we can flush and/or swap buffers to keep the GPU from
|
||||
// queuing up too much work.
|
||||
for (int loopCount = loopsPerIter; loopCount > 0; ) {
|
||||
if (NULL != canvas) {
|
||||
canvas->save();
|
||||
}
|
||||
if (frameIntervalComputed && loopCount > loopsPerFrame) {
|
||||
bench->setLoops(loopsPerFrame);
|
||||
loopCount -= loopsPerFrame;
|
||||
|
@ -629,11 +628,11 @@ int tool_main(int argc, char** argv) {
|
|||
glContext->swapBuffers();
|
||||
}
|
||||
#endif
|
||||
if (NULL != canvas) {
|
||||
canvas->restore();
|
||||
}
|
||||
}
|
||||
|
||||
if (NULL != canvas) {
|
||||
canvas->restore();
|
||||
}
|
||||
|
||||
|
||||
// Stop truncated timers before GL calls complete, and stop the full timers after.
|
||||
|
|
Загрузка…
Ссылка в новой задаче