blob: ce3da8098e5573c702300fb0ab76ca852ca0e59c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "Test.h"
#if SK_SUPPORT_GPU
#include "GrCaps.h"
#include "GrContext.h"
#include "GrContextFactory.h"
#include "GrGpu.h"
static void test_print(skiatest::Reporter*, const GrCaps* caps) {
// This used to assert.
SkString result = caps->dump();
SkASSERT(!result.isEmpty());
SkString shaderResult = caps->shaderCaps()->dump();
SkASSERT(!shaderResult.isEmpty());
}
DEF_GPUTEST(GrDrawTarget, reporter, factory) {
for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
GrContextFactory::GLContextType glType = static_cast<GrContextFactory::GLContextType>(type);
GrContext* grContext = factory->get(glType);
if (nullptr == grContext) {
continue;
}
test_print(reporter, grContext->caps());
}
}
#endif
|