aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/GrTest.cpp
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2018-05-16 14:54:41 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-16 19:28:32 +0000
commitcbeae03caee3b6c26c22f5f24c817521c78f8e43 (patch)
treebc24b50ca9e52de8fc783e087656027af1db53ce /tools/gpu/GrTest.cpp
parentaf0f79c286ac955a94b2a0834099f3abd61584b5 (diff)
Fix check for valid proxies returned by AtlasManager.
Also renames a lot of variables to make it clearer that getProxies() returns the number of instantiated proxies, not the number of all proxies. Bug: skia: Change-Id: Ifbc910cbd6635dccdb4e7f0df2e69a0f341130af Reviewed-on: https://skia-review.googlesource.com/128660 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tools/gpu/GrTest.cpp')
-rw-r--r--tools/gpu/GrTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index 311f318b9f..ec07758db2 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -130,9 +130,9 @@ sk_sp<SkImage> GrContextPriv::getFontAtlasImage_ForTesting(GrMaskFormat format,
return nullptr;
}
- unsigned int numProxies;
- const sk_sp<GrTextureProxy>* proxies = atlasManager->getProxies(format, &numProxies);
- if (index >= numProxies || !proxies[index]) {
+ unsigned int numActiveProxies;
+ const sk_sp<GrTextureProxy>* proxies = atlasManager->getProxies(format, &numActiveProxies);
+ if (index >= numActiveProxies || !proxies || !proxies[index]) {
return nullptr;
}