- add sources.
[platform/framework/web/crosswalk.git] / src / gpu / command_buffer / service / gl_utils.h
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This file includes all the necessary GL headers and implements some useful
6 // utilities.
7
8 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_
9 #define GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_
10
11 #include "build/build_config.h"
12 #include "ui/gl/gl_bindings.h"
13
14 // Define this for extra GL error debugging (slower).
15 // #define GL_ERROR_DEBUGGING
16 #ifdef GL_ERROR_DEBUGGING
17 #define CHECK_GL_ERROR() do {                                           \
18     GLenum gl_error = glGetError();                                     \
19     LOG_IF(ERROR, gl_error != GL_NO_ERROR) << "GL Error :" << gl_error; \
20   } while (0)
21 #else  // GL_ERROR_DEBUGGING
22 #define CHECK_GL_ERROR() void(0)
23 #endif  // GL_ERROR_DEBUGGING
24
25 #endif  // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_