Debian Codegraph @

include/gpu/ganesh/gl/GrGLConfig.h

raw
1 /*
2 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrGLConfig_DEFINED
9 #define GrGLConfig_DEFINED
10
11 #include "include/private/base/SkLoadUserConfig.h"
12
13 #if !defined(GR_GL_FUNCTION_TYPE)
14 #if defined(SK_BUILD_FOR_WIN)
15 #define GR_GL_FUNCTION_TYPE __stdcall
16 #else
17 #define GR_GL_FUNCTION_TYPE
18 #endif
19 #endif
20
21 /**
22 * The following are optional defines that can be enabled at the compiler
23 * command line, in a IDE project, in a GrUserConfig.h file, or in a GL custom
24 * file (if one is in use). If a GR_GL_CUSTOM_SETUP_HEADER is used they can
25 * also be placed there.
26 *
27 * GR_GL_LOG_CALLS: if 1 Gr can print every GL call using SkDebugf. Defaults to
28 * 0. Logging can be enabled and disabled at runtime using a debugger via to
29 * global gLogCallsGL. The initial value of gLogCallsGL is controlled by
30 * GR_GL_LOG_CALLS_START.
31 *
32 * GR_GL_LOG_CALLS_START: controls the initial value of gLogCallsGL when
33 * GR_GL_LOG_CALLS is 1. Defaults to 0.
34 *
35 * GR_GL_CHECK_ERROR: if enabled Gr can do a glGetError() after every GL call.
36 * Defaults to 1 if SK_DEBUG is set, otherwise 0. When GR_GL_CHECK_ERROR is 1
37 * this can be toggled in a debugger using the gCheckErrorGL global. The initial
38 * value of gCheckErrorGL is controlled by by GR_GL_CHECK_ERROR_START.
39 *
40 * GR_GL_CHECK_ERROR_START: controls the initial value of gCheckErrorGL
41 * when GR_GL_CHECK_ERROR is 1. Defaults to 1.
42 *
43 */
44
45 #if !defined(GR_GL_LOG_CALLS)
46 #ifdef SK_DEBUG
47 #define GR_GL_LOG_CALLS 1
48 #else
49 #define GR_GL_LOG_CALLS 0
50 #endif
51 #endif
52
53 #if !defined(GR_GL_LOG_CALLS_START)
54 #define GR_GL_LOG_CALLS_START 0
55 #endif
56
57 #if !defined(GR_GL_CHECK_ERROR)
58 #ifdef SK_DEBUG
59 #define GR_GL_CHECK_ERROR 1
60 #else
61 #define GR_GL_CHECK_ERROR 0
62 #endif
63 #endif
64
65 #if !defined(GR_GL_CHECK_ERROR_START)
66 #define GR_GL_CHECK_ERROR_START 1
67 #endif
68
69 #endif