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

Side by Side Diff: tests/GrContextFactoryTest.cpp

Issue 319043005: Support using OpenGL ES context on desktop (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 unified diff | Download patch
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 #if SK_SUPPORT_GPU 8 #if SK_SUPPORT_GPU
9 9
10 #include "GrContextFactory.h" 10 #include "GrContextFactory.h"
11 #include "Test.h" 11 #include "Test.h"
12 12
13 DEF_GPUTEST(GrContextFactoryTest, reporter, factory) { 13 DEF_GPUTEST(GrContextFactoryTest, reporter, factory) {
14 // Reset in case some other test has been using it first. 14 // Reset in case some other test has been using it first.
15 factory->destroyContexts(); 15 factory->destroyContexts();
16 16
17 // Before we ask for a context, we expect the GL context to not be there. 17 // Before we ask for a context, we expect the GL context to not be there.
18 REPORTER_ASSERT(reporter, 18 REPORTER_ASSERT(reporter,
19 NULL == factory->getGLContext(GrContextFactory::kNative_GLCo ntextType)); 19 NULL == factory->getGLContext(GrContextFactory::kNative_GLCo ntextType));
20 20
21 // After we ask for a context, we expect that the GL context to be there. 21 // After we ask for a context, we expect that the GL context to be there.
22 factory->get(GrContextFactory::kNative_GLContextType); 22 factory->get(GrContextFactory::kNative_GLContextType, kNone_GrGLStandard);
23 REPORTER_ASSERT(reporter, 23 REPORTER_ASSERT(reporter,
24 factory->getGLContext(GrContextFactory::kNative_GLContextTyp e) != NULL); 24 factory->getGLContext(GrContextFactory::kNative_GLContextTyp e) != NULL);
25 25
26 // If we did not ask for a context with the particular GL context, we would 26 // If we did not ask for a context with the particular GL context, we would
27 // expect the particular GL context to not be there. 27 // expect the particular GL context to not be there.
28 REPORTER_ASSERT(reporter, 28 REPORTER_ASSERT(reporter,
29 NULL == factory->getGLContext(GrContextFactory::kNull_GLCont extType)); 29 NULL == factory->getGLContext(GrContextFactory::kNull_GLCont extType));
30 } 30 }
31 31
32 #endif 32 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698