aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/gl/angle/GLTestContext_angle.h
blob: de7659a7a5befd2b6f614990db6d381b099c7894 (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 2012 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */
#ifndef GLTestContext_angle_DEFINED
#define GLTestContext_angle_DEFINED

#include "gl/GLTestContext.h"

namespace sk_gpu_test {

/**
 * Creates a GrGLInterface for the current ANGLE GLES Context. Here current means bound in ANGLE's
 * implementation of EGL.
 */
sk_sp<const GrGLInterface> CreateANGLEGLInterface();

enum class ANGLEBackend {
    kD3D9,
    kD3D11,
    kOpenGL
};

enum class ANGLEContextVersion {
    kES2,
    kES3
};

/** Creates a GLTestContext backed by ANGLE. */
std::unique_ptr<GLTestContext> MakeANGLETestContext(ANGLEBackend, ANGLEContextVersion,
                                                    GLTestContext* shareContext = nullptr,
                                                    void* display = nullptr);

}  // namespace sk_gpu_test
#endif