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

Side by Side Diff: tests/GrDrawTargetTest.cpp

Issue 1448873002: Generate list of GPU contexts outside tests (Closed) Base URL: https://skia.googlesource.com/skia.git@commandbuffer-as-api-01-gpu-test-context-support
Patch Set: make blurtest for all rendering contexts Created 5 years 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/GpuLayerCacheTest.cpp ('k') | tests/GrPorterDuffTest.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "Test.h" 9 #include "Test.h"
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
11 11
12 #include "GrCaps.h" 12 #include "GrCaps.h"
13 #include "GrContext.h" 13 #include "GrContext.h"
14 #include "GrContextFactory.h"
15 #include "GrGpu.h" 14 #include "GrGpu.h"
16 15
17 static void test_print(skiatest::Reporter*, const GrCaps* caps) { 16 DEF_GPUTEST_FOR_ALL_CONTEXTS(GrDrawTargetPrint, reporter, context) {
18 // This used to assert. 17 // This used to assert.
19 SkString result = caps->dump(); 18 SkString result = context->caps()->dump();
20 SkASSERT(!result.isEmpty()); 19 SkASSERT(!result.isEmpty());
21 SkString shaderResult = caps->shaderCaps()->dump(); 20 SkString shaderResult = context->caps()->shaderCaps()->dump();
22 SkASSERT(!shaderResult.isEmpty()); 21 SkASSERT(!shaderResult.isEmpty());
23 } 22 }
24 23
25 DEF_GPUTEST(GrDrawTarget, reporter, factory) {
26 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
27 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type);
28
29 GrContext* grContext = factory->get(glType);
30 if (nullptr == grContext) {
31 continue;
32 }
33
34 test_print(reporter, grContext->caps());
35 }
36 }
37
38 #endif 24 #endif
OLDNEW
« no previous file with comments | « tests/GpuLayerCacheTest.cpp ('k') | tests/GrPorterDuffTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698