michael@0: michael@0: /* michael@0: * Copyright 2011 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: #ifndef GrGLConfig_chrome_DEFINED michael@0: #define GrGLConfig_chrome_DEFINED michael@0: michael@0: // glGetError() forces a sync with gpu process on chrome michael@0: #define GR_GL_CHECK_ERROR_START 0 michael@0: michael@0: #if defined(SK_BUILD_FOR_WIN32) michael@0: // ANGLE creates a temp VB for vertex attributes not specified per-vertex. michael@0: #define GR_GL_NO_CONSTANT_ATTRIBUTES 1 michael@0: michael@0: // For RGBA teximage/readpixels ANGLE will sw-convert to/from BGRA. michael@0: #define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 1 michael@0: michael@0: // ANGLE can go faster if the entire fbo is read rather than a subrect michael@0: #define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 1 michael@0: #else michael@0: #define GR_GL_NO_CONSTANT_ATTRIBUTES 0 michael@0: #define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 0 michael@0: #define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 0 michael@0: #endif michael@0: michael@0: // cmd buffer allocates memory and memsets it to zero when it sees glBufferData michael@0: // with NULL. michael@0: #define GR_GL_USE_BUFFER_DATA_NULL_HINT 0 michael@0: michael@0: // chrome uses this to set the context on each GL call. michael@0: #define GR_GL_PER_GL_FUNC_CALLBACK 1 michael@0: michael@0: // Check error is even more expensive in chrome (cmd buffer flush). The michael@0: // compositor also doesn't check its allocations. michael@0: #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 michael@0: michael@0: // CheckFramebufferStatus in chrome synchronizes the gpu and renderer processes. michael@0: #define GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT 1 michael@0: michael@0: // Non-VBO vertices and indices are not allowed in Chromium. michael@0: #define GR_GL_MUST_USE_VBO 1 michael@0: michael@0: // Use updated Khronos signature for glShaderSource michael@0: // (const char* const instead of char**). michael@0: #define GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE 1 michael@0: michael@0: #if !defined(GR_GL_IGNORE_ES3_MSAA) michael@0: #define GR_GL_IGNORE_ES3_MSAA 1 michael@0: #endif michael@0: michael@0: #endif