Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3659)

Unified Diff: bench/SKPBench.cpp

Issue 1491823003: reset shader compilations for stats (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SKPBench.cpp
diff --git a/bench/SKPBench.cpp b/bench/SKPBench.cpp
index c5480904053dbfd98cce060e1860f3bc366f3e61..6f4c688d231ff61c0de6ddad82537a2c6496dc4a 100644
--- a/bench/SKPBench.cpp
+++ b/bench/SKPBench.cpp
@@ -157,6 +157,7 @@ void SKPBench::drawPicture() {
}
#if SK_SUPPORT_GPU
+#include "GrGpu.h"
static void draw_pic_for_stats(SkCanvas* canvas, GrContext* context, const SkPicture* picture,
SkTArray<SkString>* keys, SkTArray<double>* values,
const char* tag) {
@@ -186,6 +187,7 @@ void SKPBench::getGpuStats(SkCanvas* canvas, SkTArray<SkString>* keys, SkTArray<
context->flush();
context->freeGpuResources();
context->resetContext();
+ context->getGpu()->resetShaderCacheForTesting();
draw_pic_for_stats(canvas, context, fPic, keys, values, "first_frame");
// draw second frame
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698