set key data in duplicate scratch key unit test

TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/722763002
This commit is contained in:
bsalomon 2014-11-12 10:28:17 -08:00 committed by Commit bot
parent 71a2363707
commit 48ea202817

View File

@ -131,6 +131,7 @@ static void test_duplicate_scratch_key(skiatest::Reporter* reporter) {
SkASSERT(0 == cache->getCachedResourceCount() && 0 == cache->getCachedResourceBytes());
GrCacheID::Key keyData;
memset(&keyData, 0, sizeof(keyData));
GrCacheID::Domain domain = GrResourceKey::ScratchDomain();
GrResourceKey::ResourceType t = GrResourceKey::GenerateResourceType();
GrResourceKey scratchKey(GrCacheID(domain, keyData), t, 0);