• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 /*
3  * Copyright 2012 Google Inc.
4  *
5  * Use of this source code is governed by a BSD-style license that can be
6  * found in the LICENSE file.
7  */
8 #ifndef GLTestContext_angle_DEFINED
9 #define GLTestContext_angle_DEFINED
10 
11 #include "gl/GLTestContext.h"
12 
13 namespace sk_gpu_test {
14 
15 /**
16  * Creates a GrGLInterface for the current ANGLE GLES Context. Here current means bound in ANGLE's
17  * implementation of EGL.
18  */
19 const GrGLInterface* CreateANGLEGLInterface();
20 
21 enum class ANGLEBackend {
22     kD3D9,
23     kD3D11,
24     kOpenGL
25 };
26 
27 enum class ANGLEContextVersion {
28     kES2,
29     kES3
30 };
31 
32 /** Creates a GLTestContext backed by ANGLE. */
33 std::unique_ptr<GLTestContext> MakeANGLETestContext(ANGLEBackend, ANGLEContextVersion,
34                                                     GLTestContext* shareContext = nullptr,
35                                                     void* display = nullptr);
36 
37 }  // namespace sk_gpu_test
38 #endif
39