aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ResourceAllocatorTest.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-03-08 15:27:36 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-08 21:05:21 +0000
commit4684f82ebca85d4c7043e5c1028e34cf5631da32 (patch)
tree6e640d1b212ab614fa19ccd4e43c5adff440dacd /tests/ResourceAllocatorTest.cpp
parent3adc12213b2d1efbe417476517ff3381af17a311 (diff)
Add ability to uninstantiate lazy proxies after every flush.
Bug: skia: Change-Id: Id32540cda54a9c5e3e6cb721776699be3cc8ac1a Reviewed-on: https://skia-review.googlesource.com/113263 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/ResourceAllocatorTest.cpp')
-rw-r--r--tests/ResourceAllocatorTest.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/ResourceAllocatorTest.cpp b/tests/ResourceAllocatorTest.cpp
index 7647e89687..7718146ce4 100644
--- a/tests/ResourceAllocatorTest.cpp
+++ b/tests/ResourceAllocatorTest.cpp
@@ -20,6 +20,7 @@
#include "GrTest.h"
#include "GrTexture.h"
#include "GrTextureProxy.h"
+#include "GrUninstantiateProxyTracker.h"
struct ProxyParams {
int fSize;
@@ -71,7 +72,8 @@ static void overlap_test(skiatest::Reporter* reporter, GrResourceProvider* resou
int startIndex, stopIndex;
GrResourceAllocator::AssignError error;
- alloc.assign(&startIndex, &stopIndex, &error);
+ GrUninstantiateProxyTracker uninstantiateTracker;
+ alloc.assign(&startIndex, &stopIndex, &uninstantiateTracker, &error);
REPORTER_ASSERT(reporter, GrResourceAllocator::AssignError::kNoError == error);
REPORTER_ASSERT(reporter, p1->priv().peekSurface());
@@ -93,7 +95,8 @@ static void non_overlap_test(skiatest::Reporter* reporter, GrResourceProvider* r
int startIndex, stopIndex;
GrResourceAllocator::AssignError error;
- alloc.assign(&startIndex, &stopIndex, &error);
+ GrUninstantiateProxyTracker uninstantiateTracker;
+ alloc.assign(&startIndex, &stopIndex, &uninstantiateTracker, &error);
REPORTER_ASSERT(reporter, GrResourceAllocator::AssignError::kNoError == error);
REPORTER_ASSERT(reporter, p1->priv().peekSurface());