GrResourceCache2 manages scratch texture.
BUG=skia:2889
Review URL: https://codereview.chromium.org/608883003
diff --git a/bench/GrResourceCacheBench.cpp b/bench/GrResourceCacheBench.cpp
index 234a626..894ec14 100644
--- a/bench/GrResourceCacheBench.cpp
+++ b/bench/GrResourceCacheBench.cpp
@@ -11,6 +11,7 @@
#include "Benchmark.h"
#include "GrGpuResource.h"
#include "GrContext.h"
+#include "GrGpu.h"
#include "GrResourceCache.h"
#include "GrStencilBuffer.h"
#include "GrTexture.h"
@@ -185,7 +186,7 @@
GrGpu* gpu = canvas->getGrContext()->getGpu();
for (int i = 0; i < loops; ++i) {
- GrResourceCache cache(CACHE_SIZE_COUNT, CACHE_SIZE_BYTES);
+ GrResourceCache cache(gpu->caps(), CACHE_SIZE_COUNT, CACHE_SIZE_BYTES);
populate_cache(&cache, gpu, DUPLICATE_COUNT);
populate_cache(&cache, gpu, RESOURCE_COUNT);
@@ -219,7 +220,7 @@
virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
GrGpu* gpu = canvas->getGrContext()->getGpu();
- GrResourceCache cache(CACHE_SIZE_COUNT, CACHE_SIZE_BYTES);
+ GrResourceCache cache(gpu->caps(), CACHE_SIZE_COUNT, CACHE_SIZE_BYTES);
populate_cache(&cache, gpu, DUPLICATE_COUNT);
populate_cache(&cache, gpu, RESOURCE_COUNT);