blob: 2bae14579e9d519b026652a9252323e69ce9a2d5 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
2/*
3 * Copyright 2011 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 */
reed@google.combf858b72011-01-19 19:04:04 +00008#ifndef GrGLConfig_chrome_DEFINED
9#define GrGLConfig_chrome_DEFINED
10
bsalomon@google.com3723a482011-02-17 21:47:25 +000011// glGetError() forces a sync with gpu process on chrome
bsalomon@google.com4f3c2532012-01-19 16:16:52 +000012#define GR_GL_CHECK_ERROR_START 0
bsalomon@google.com4be283f2011-04-19 21:15:09 +000013
14// ANGLE creates a temp VB for vertex attributes not specified per-vertex.
bsalomon@google.com4f3c2532012-01-19 16:16:52 +000015#define GR_GL_NO_CONSTANT_ATTRIBUTES GR_WIN32_BUILD
bsalomon@google.com3723a482011-02-17 21:47:25 +000016
bsalomon@google.coma85449d2011-11-19 02:36:05 +000017// For RGBA teximage/readpixels ANGLE will sw-convert to/from BGRA.
bsalomon@google.com4f3c2532012-01-19 16:16:52 +000018#define GR_GL_RGBA_8888_PIXEL_OPS_SLOW GR_WIN32_BUILD
bsalomon@google.com0a97be22011-11-08 19:20:57 +000019
bsalomon@google.com56d11e02011-11-30 19:59:08 +000020// ANGLE can go faster if the entire fbo is read rather than a subrect
bsalomon@google.com4f3c2532012-01-19 16:16:52 +000021#define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL GR_WIN32_BUILD
bsalomon@google.com56d11e02011-11-30 19:59:08 +000022
bsalomon@google.com9ae44292011-07-01 15:21:59 +000023// cmd buffer allocates memory and memsets it to zero when it sees glBufferData
24// with NULL.
bsalomon@google.com4f3c2532012-01-19 16:16:52 +000025#define GR_GL_USE_BUFFER_DATA_NULL_HINT 0
bsalomon@google.com9ae44292011-07-01 15:21:59 +000026
bsalomon@google.com56bfc5a2011-09-01 13:28:16 +000027// chrome uses this to set the context on each GL call.
bsalomon@google.com4f3c2532012-01-19 16:16:52 +000028#define GR_GL_PER_GL_FUNC_CALLBACK 1
29
30// Check error is even more expensive in chrome (cmd buffer flush). The
31// compositor also doesn't check its allocations.
32#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
bsalomon@google.com56bfc5a2011-09-01 13:28:16 +000033
reed@google.combf858b72011-01-19 19:04:04 +000034#endif