aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Phillips <robertphillips@google.com>2019-02-01 10:19:42 -0500
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2019-02-01 16:18:23 +0000
commitfd0d97092b4aee4b78111f116b923e52d7734f27 (patch)
tree9cd0b12f64bcf5d12ad18d212c0afcaee5f220ac /tests
parente6e72bcbfabd960322b08a4d5881db97351bd2e2 (diff)
downloadskqp-fd0d97092b4aee4b78111f116b923e52d7734f27.tar.gz
Rename GrContext::uniqueID to contextID and hide it
The GrContext's ID isn't really unique any more (since it can be shared among a family of contexts). Change its name to reflect the new reality. Additionally, no client seems to be using it so make it private. Change-Id: Ibb9004d699fe6ca7876b3be94142e612b5b9efbd Reviewed-on: https://skia-review.googlesource.com/c/188308 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ResourceCacheTest.cpp10
-rw-r--r--tests/TextureProxyTest.cpp4
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index c0529cd374..e15eb810ea 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -1045,8 +1045,8 @@ static void test_purge_invalidated(skiatest::Reporter* reporter) {
typedef SkMessageBus<GrUniqueKeyInvalidatedMessage> Bus;
// Invalidate two of the three, they should be purged and no longer accessible via their keys.
- Bus::Post(Msg(key1, context->uniqueID()));
- Bus::Post(Msg(key2, context->uniqueID()));
+ Bus::Post(Msg(key1, context->contextPriv().contextID()));
+ Bus::Post(Msg(key2, context->contextPriv().contextID()));
cache->purgeAsNeeded();
// a should be deleted now, but we still have a ref on b.
REPORTER_ASSERT(reporter, !cache->hasUniqueKey(key1));
@@ -1055,7 +1055,7 @@ static void test_purge_invalidated(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, cache->hasUniqueKey(key3));
// Invalidate the third.
- Bus::Post(Msg(key3, context->uniqueID()));
+ Bus::Post(Msg(key3, context->contextPriv().contextID()));
cache->purgeAsNeeded();
// we still have a ref on b, c should be recycled as scratch.
REPORTER_ASSERT(reporter, 2 == TestResource::NumAlive());
@@ -1571,13 +1571,13 @@ static void test_free_resource_messages(skiatest::Reporter* reporter) {
cache->purgeAsNeeded();
// Send message to free the first resource
- GrGpuResourceFreedMessage msg1{wrapped1, context->uniqueID()};
+ GrGpuResourceFreedMessage msg1{wrapped1, context->contextPriv().contextID()};
SkMessageBus<GrGpuResourceFreedMessage>::Post(msg1);
cache->purgeAsNeeded();
REPORTER_ASSERT(reporter, 2 == TestResource::NumAlive());
- GrGpuResourceFreedMessage msg2{wrapped3, context->uniqueID()};
+ GrGpuResourceFreedMessage msg2{wrapped3, context->contextPriv().contextID()};
SkMessageBus<GrGpuResourceFreedMessage>::Post(msg2);
cache->purgeAsNeeded();
diff --git a/tests/TextureProxyTest.cpp b/tests/TextureProxyTest.cpp
index dc71e0e60b..ed43787a4a 100644
--- a/tests/TextureProxyTest.cpp
+++ b/tests/TextureProxyTest.cpp
@@ -203,7 +203,7 @@ static void basic_test(GrContext* context,
if (expectResourceToOutliveProxy) {
proxy.reset();
- GrUniqueKeyInvalidatedMessage msg(texKey, context->uniqueID());
+ GrUniqueKeyInvalidatedMessage msg(texKey, context->contextPriv().contextID());
SkMessageBus<GrUniqueKeyInvalidatedMessage>::Post(msg);
cache->purgeAsNeeded();
expectedCacheCount--;
@@ -278,7 +278,7 @@ static void invalidation_and_instantiation_test(GrContext* context, skiatest::Re
// Send an invalidation message, which will be sitting in the cache's inbox
SkMessageBus<GrUniqueKeyInvalidatedMessage>::Post(
- GrUniqueKeyInvalidatedMessage(key, context->uniqueID()));
+ GrUniqueKeyInvalidatedMessage(key, context->contextPriv().contextID()));
REPORTER_ASSERT(reporter, 1 == proxyProvider->numUniqueKeyProxies_TestOnly());
REPORTER_ASSERT(reporter, 0 == cache->getResourceCount());