aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
Diffstat (limited to 'bench')
-rw-r--r--bench/ImageCacheBudgetBench.cpp5
-rw-r--r--bench/SKPBench.cpp6
-rw-r--r--bench/nanobench.cpp5
3 files changed, 9 insertions, 7 deletions
diff --git a/bench/ImageCacheBudgetBench.cpp b/bench/ImageCacheBudgetBench.cpp
index 12e579060e..a6ee430c61 100644
--- a/bench/ImageCacheBudgetBench.cpp
+++ b/bench/ImageCacheBudgetBench.cpp
@@ -14,6 +14,7 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
+#include "GrContextPriv.h"
/** These benchmarks were designed to measure changes to GrResourceCache's replacement policy */
@@ -46,7 +47,7 @@ void set_cache_budget(SkCanvas* canvas, int approxImagesInBudget) {
GrContext* context = canvas->getGrContext();
SkASSERT(context);
context->flush();
- context->purgeAllUnlockedResources();
+ context->contextPriv().purgeAllUnlockedResources_ForTesting();
sk_sp<SkImage> image;
make_images(&image, 1);
draw_image(canvas, image.get());
@@ -55,7 +56,7 @@ void set_cache_budget(SkCanvas* canvas, int approxImagesInBudget) {
context->getResourceCacheUsage(&baselineCount, nullptr);
baselineCount -= 1; // for the image's textures.
context->setResourceCacheLimits(baselineCount + approxImagesInBudget, 1 << 30);
- context->purgeAllUnlockedResources();
+ context->contextPriv().purgeAllUnlockedResources_ForTesting();
}
//////////////////////////////////////////////////////////////////////////////
diff --git a/bench/SKPBench.cpp b/bench/SKPBench.cpp
index 4fbb1bba29..1391b40cf6 100644
--- a/bench/SKPBench.cpp
+++ b/bench/SKPBench.cpp
@@ -163,13 +163,13 @@ void SKPBench::drawPicture() {
static void draw_pic_for_stats(SkCanvas* canvas, GrContext* context, const SkPicture* picture,
SkTArray<SkString>* keys, SkTArray<double>* values,
const char* tag) {
- context->resetGpuStats();
+ context->contextPriv().resetGpuStats();
canvas->drawPicture(picture);
canvas->flush();
int offset = keys->count();
- context->dumpGpuStatsKeyValuePairs(keys, values);
- context->dumpCacheStatsKeyValuePairs(keys, values);
+ context->contextPriv().dumpGpuStatsKeyValuePairs(keys, values);
+ context->contextPriv().dumpCacheStatsKeyValuePairs(keys, values);
// append tag, but only to new tags
for (int i = offset; i < keys->count(); i++, offset++) {
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index f7f0bff82b..2246fbb07d 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -60,6 +60,7 @@ extern bool gSkForceRasterPipelineBlitter;
#if SK_SUPPORT_GPU
#include "gl/GrGLDefines.h"
#include "GrCaps.h"
+ #include "GrContextPriv.h"
#include "GrContextFactory.h"
#include "gl/GrGLUtil.h"
#include "SkGr.h"
@@ -230,8 +231,8 @@ struct GPUTarget : public Target {
}
void dumpStats() override {
- this->contextInfo.grContext()->printCacheStats();
- this->contextInfo.grContext()->printGpuStats();
+ this->contextInfo.grContext()->contextPriv().printCacheStats();
+ this->contextInfo.grContext()->contextPriv().printGpuStats();
}
};