Fix crash in SpeechRecognizerImpl introduced in AudioParams refactor.
[chromium-blink-merge.git] / gpu / command_buffer / service / gl_utils.h
blobade4a3748a7d4880fc2887c8d75ca3103863cee1
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.
5 // This file includes all the necessary GL headers and implements some useful
6 // utilities.
8 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_
9 #define GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_
11 #include "build/build_config.h"
12 #include "ui/gl/gl_bindings.h"
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
25 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_UTILS_H_