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

Side by Side Diff: tests/GrContextFactoryTest.cpp

Issue 1455093003: Remove GrContextFactory::getGLContext (Closed) Base URL: https://skia.googlesource.com/skia.git@commandbuffer-as-api-01-gpu-test-context-support
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 unified diff | Download patch
« no previous file with comments | « tests/GLInterfaceValidationTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkTypes.h" 8 #include "SkTypes.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
11 11
12 #include "GrContextFactory.h" 12 #include "GrContextFactory.h"
13 #include "Test.h" 13 #include "Test.h"
14 14
15 DEF_GPUTEST(GrContextFactory, reporter, factory) { 15 // TODO: test GrContextFactory.
16 // Reset in case some other test has been using it first.
17 factory->destroyContexts();
18
19 // Before we ask for a context, we expect the GL context to not be there.
20 REPORTER_ASSERT(reporter,
21 nullptr == factory->getGLContext(GrContextFactory::kNull_GLC ontextType));
22
23 // After we ask for a context, we expect that the GL context to be there.
24 factory->get(GrContextFactory::kNull_GLContextType);
25 REPORTER_ASSERT(reporter,
26 factory->getGLContext(GrContextFactory::kNull_GLContextType) != nullptr);
27
28 // If we did not ask for a context with the particular GL context, we would
29 // expect the particular GL context to not be there.
30 REPORTER_ASSERT(reporter,
31 nullptr == factory->getGLContext(GrContextFactory::kDebug_GL ContextType));
32 }
33 16
34 #endif 17 #endif
OLDNEW
« no previous file with comments | « tests/GLInterfaceValidationTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698