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

Side by Side Diff: tests/GrContextAbandonTest.cpp

Issue 1845923004: Rename enums in GrContextFactory to remove "GL" (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | tests/GrContextFactoryTest.cpp » ('j') | 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 2016 Google Inc. 2 * Copyright 2016 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 using sk_gpu_test::GrContextFactory; 15 using sk_gpu_test::GrContextFactory;
16 16
17 DEF_GPUTEST(GrContext_abandonContext, reporter, /*factory*/) { 17 DEF_GPUTEST(GrContext_abandonContext, reporter, /*factory*/) {
18 for (int testType = 0; testType < 6; ++testType) { 18 for (int testType = 0; testType < 6; ++testType) {
19 for (int i = 0; i < GrContextFactory::kGLContextTypeCnt; ++i) { 19 for (int i = 0; i < GrContextFactory::kContextTypeCnt; ++i) {
20 GrContextFactory testFactory; 20 GrContextFactory testFactory;
21 GrContextFactory::GLContextType ctxType = (GrContextFactory::GLContextTy pe) i; 21 GrContextFactory::ContextType ctxType = (GrContextFactory::ContextTy pe) i;
22 GrContextFactory::ContextInfo info = testFactory.getContextInfo(ctxType) ; 22 GrContextFactory::ContextInfo info = testFactory.getContextInfo(ctxT ype);
23 if (GrContext* context = info.fGrContext) { 23 if (GrContext* context = info.fGrContext) {
24 switch (testType) { 24 switch (testType) {
25 case 0: 25 case 0:
26 context->abandonContext(); 26 context->abandonContext();
27 break; 27 break;
28 case 1: 28 case 1:
29 context->releaseResourcesAndAbandonContext(); 29 context->releaseResourcesAndAbandonContext();
30 break; 30 break;
31 case 2: 31 case 2:
32 context->abandonContext(); 32 context->abandonContext();
(...skipping 11 matching lines...) Expand all
44 context->releaseResourcesAndAbandonContext(); 44 context->releaseResourcesAndAbandonContext();
45 context->releaseResourcesAndAbandonContext(); 45 context->releaseResourcesAndAbandonContext();
46 break; 46 break;
47 } 47 }
48 } 48 }
49 } 49 }
50 } 50 }
51 } 51 }
52 52
53 #endif 53 #endif
OLDNEW
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | tests/GrContextFactoryTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698