Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: tests/ResourceCacheTest.cpp

Issue 1429863009: Use a struct for client GL texture handles (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/ResourceCacheTest.cpp
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index 83e4535361cc966dec897c158578596c4dd37b76..c33af9f302309e597e625d1307d5587ed5d1210d 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -183,12 +183,12 @@ static void test_wrapped_resources(skiatest::Reporter* reporter, GrContext* cont
return;
}
- GrBackendObject texIDs[2];
+ GrBackendObject texHandles[2];
static const int kW = 100;
static const int kH = 100;
- texIDs[0] = gpu->createTestingOnlyBackendTexture(nullptr, kW, kH, kRGBA_8888_GrPixelConfig);
- texIDs[1] = gpu->createTestingOnlyBackendTexture(nullptr, kW, kH, kRGBA_8888_GrPixelConfig);
+ texHandles[0] = gpu->createTestingOnlyBackendTexture(nullptr, kW, kH, kRGBA_8888_GrPixelConfig);
+ texHandles[1] = gpu->createTestingOnlyBackendTexture(nullptr, kW, kH, kRGBA_8888_GrPixelConfig);
context->resetContext();
@@ -197,11 +197,11 @@ static void test_wrapped_resources(skiatest::Reporter* reporter, GrContext* cont
desc.fWidth = kW;
desc.fHeight = kH;
- desc.fTextureHandle = texIDs[0];
+ desc.fTextureHandle = texHandles[0];
SkAutoTUnref<GrTexture> borrowed(context->textureProvider()->wrapBackendTexture(
desc, kBorrow_GrWrapOwnership));
- desc.fTextureHandle = texIDs[1];
+ desc.fTextureHandle = texHandles[1];
SkAutoTUnref<GrTexture> adopted(context->textureProvider()->wrapBackendTexture(
desc, kAdopt_GrWrapOwnership));
@@ -215,13 +215,13 @@ static void test_wrapped_resources(skiatest::Reporter* reporter, GrContext* cont
context->flush();
- bool borrowedIsAlive = gpu->isTestingOnlyBackendTexture(texIDs[0]);
- bool adoptedIsAlive = gpu->isTestingOnlyBackendTexture(texIDs[1]);
+ bool borrowedIsAlive = gpu->isTestingOnlyBackendTexture(texHandles[0]);
+ bool adoptedIsAlive = gpu->isTestingOnlyBackendTexture(texHandles[1]);
REPORTER_ASSERT(reporter, borrowedIsAlive);
REPORTER_ASSERT(reporter, !adoptedIsAlive);
- gpu->deleteTestingOnlyBackendTexture(texIDs[0]);
+ gpu->deleteTestingOnlyBackendTexture(texHandles[0]);
context->resetContext();
}
« include/gpu/gl/GrGLTypes.h ('K') | « tests/GrSurfaceTest.cpp ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698