From 5931922997b8904b1243240120014c016064b9fa Mon Sep 17 00:00:00 2001 From: kkinnunen Date: Sun, 22 Nov 2015 23:23:53 -0800 Subject: Remove GrContextFactory::getGLContext Remove GrContextFactory::getGLContext, it is problematic: It has the bug of not checking for the context type. It also is error-prone, since the GL context is not made current, but it is callers may assume it is current. It is also not used very much. Clients can use GrContextFactory::getContextInfo. BUG=skia: Review URL: https://codereview.chromium.org/1455093003 --- tests/GrContextFactoryTest.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'tests/GrContextFactoryTest.cpp') diff --git a/tests/GrContextFactoryTest.cpp b/tests/GrContextFactoryTest.cpp index 787f16c983..79209c719f 100644 --- a/tests/GrContextFactoryTest.cpp +++ b/tests/GrContextFactoryTest.cpp @@ -12,23 +12,6 @@ #include "GrContextFactory.h" #include "Test.h" -DEF_GPUTEST(GrContextFactory, reporter, factory) { - // Reset in case some other test has been using it first. - factory->destroyContexts(); - - // Before we ask for a context, we expect the GL context to not be there. - REPORTER_ASSERT(reporter, - nullptr == factory->getGLContext(GrContextFactory::kNull_GLContextType)); - - // After we ask for a context, we expect that the GL context to be there. - factory->get(GrContextFactory::kNull_GLContextType); - REPORTER_ASSERT(reporter, - factory->getGLContext(GrContextFactory::kNull_GLContextType) != nullptr); - - // If we did not ask for a context with the particular GL context, we would - // expect the particular GL context to not be there. - REPORTER_ASSERT(reporter, - nullptr == factory->getGLContext(GrContextFactory::kDebug_GLContextType)); -} +// TODO: test GrContextFactory. #endif -- cgit v1.2.3