skia2/tests/GrDrawTargetTest.cpp
cdalton 626e1ffe84 Import functionality for new GL backend
Brings in the following functionality:

  ARB_draw_instanced
  ARB_instanced_arrays
  NV_bindless_texture
  EXT_direct_state_access
  KHR_debug

Also cleans up some of the NVPR extension loading.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/202c4c75fb806f751cf796850bf67fe9793e0643

Review URL: https://codereview.chromium.org/1185573003
2015-06-12 13:56:46 -07:00

39 lines
949 B
C++

/*
* 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 (NULL == grContext) {
continue;
}
test_print(reporter, grContext->caps());
}
}
#endif