Fix nanobench SKP flushes between loops
Updates SKPBench to actually flush between draw loops, as this was the original intent of the flush logic. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1715873002 Review URL: https://codereview.chromium.org/1715873002
This commit is contained in:
parent
33ad701bc3
commit
31c45bbd5a
@ -110,21 +110,22 @@ SkIPoint SKPBench::onGetSize() {
|
||||
|
||||
void SKPBench::onDraw(int loops, SkCanvas* canvas) {
|
||||
SkASSERT(fDoLooping || 1 == loops);
|
||||
if (fUseMultiPictureDraw) {
|
||||
for (int i = 0; i < loops; i++) {
|
||||
while (1) {
|
||||
if (fUseMultiPictureDraw) {
|
||||
this->drawMPDPicture();
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < loops; i++) {
|
||||
} else {
|
||||
this->drawPicture();
|
||||
}
|
||||
}
|
||||
if (0 == --loops) {
|
||||
break;
|
||||
}
|
||||
#if SK_SUPPORT_GPU
|
||||
// Ensure the GrContext doesn't batch across draw loops.
|
||||
if (GrContext* context = canvas->getGrContext()) {
|
||||
context->flush();
|
||||
}
|
||||
// Ensure the GrContext doesn't batch across draw loops.
|
||||
if (GrContext* context = canvas->getGrContext()) {
|
||||
context->flush();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void SKPBench::drawMPDPicture() {
|
||||
|
Loading…
Reference in New Issue
Block a user