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

Unified Diff: tests/GrContextFactoryTest.cpp

Issue 1966013002: Turn ContextInfos returned by GrContextFactory into structs. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: whitespace Created 4 years, 7 months 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/GrContextFactoryTest.cpp
diff --git a/tests/GrContextFactoryTest.cpp b/tests/GrContextFactoryTest.cpp
index fe4f1ef82f78824c12814ec756a9afcd46ea01bb..63e2be484790cc78ec76e4c0e7a906e075be96ce 100644
--- a/tests/GrContextFactoryTest.cpp
+++ b/tests/GrContextFactoryTest.cpp
@@ -75,26 +75,26 @@ DEF_GPUTEST(GrContextFactory_abandon, reporter, /*factory*/) {
for (int i = 0; i < GrContextFactory::kContextTypeCnt; ++i) {
GrContextFactory::ContextType ctxType = (GrContextFactory::ContextType) i;
ContextInfo info1 = testFactory.getContextInfo(ctxType);
- if (!info1.fGrContext) {
+ if (!info1.grContext()) {
continue;
}
if (GrContextFactory::ContextTypeBackend(ctxType) == kOpenGL_GrBackend) {
- REPORTER_ASSERT(reporter, info1.fGLContext);
+ REPORTER_ASSERT(reporter, info1.glContext());
}
// Ref for comparison. The API does not explicitly say that this stays alive.
- info1.fGrContext->ref();
+ info1.grContext()->ref();
testFactory.abandonContexts();
// Test that we get different context after abandon.
ContextInfo info2 = testFactory.getContextInfo(ctxType);
- REPORTER_ASSERT(reporter, info2.fGrContext);
+ REPORTER_ASSERT(reporter, info2.grContext());
if (GrContextFactory::ContextTypeBackend(ctxType) == kOpenGL_GrBackend) {
- REPORTER_ASSERT(reporter, info2.fGLContext);
+ REPORTER_ASSERT(reporter, info2.glContext());
}
- REPORTER_ASSERT(reporter, info1.fGrContext != info2.fGrContext);
+ REPORTER_ASSERT(reporter, info1.grContext() != info2.grContext());
// fGLContext should also change, but it also could get the same address.
- info1.fGrContext->unref();
+ info1.grContext()->unref();
}
}

Powered by Google App Engine
This is Rietveld 408576698