blob: ee875b7f22e049aaa3ddcb0c021febc8890b51b1 [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
commit-bot@chromium.org43823302013-09-25 20:57:51 +000014#if defined(SK_BUILD_FOR_WIN32)
bsalomon47c1ccb2015-06-24 15:04:13 -070015// For RGBA teximage/readpixels ANGLE will sw-convert to/from BGRA.
16#define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 1
17
bsalomon@google.com56d11e02011-11-30 19:59:08 +000018// ANGLE can go faster if the entire fbo is read rather than a subrect
commit-bot@chromium.org43823302013-09-25 20:57:51 +000019#define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 1
20#else
bsalomon47c1ccb2015-06-24 15:04:13 -070021#define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 0
commit-bot@chromium.org43823302013-09-25 20:57:51 +000022#define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 0
23#endif
bsalomon@google.com56d11e02011-11-30 19:59:08 +000024
bsalomon@google.com9ae44292011-07-01 15:21:59 +000025// cmd buffer allocates memory and memsets it to zero when it sees glBufferData
26// with NULL.
bsalomon@google.com4f3c2532012-01-19 16:16:52 +000027#define GR_GL_USE_BUFFER_DATA_NULL_HINT 0
bsalomon@google.com9ae44292011-07-01 15:21:59 +000028
bsalomon@google.com56bfc5a2011-09-01 13:28:16 +000029// chrome uses this to set the context on each GL call.
bsalomon@google.com4f3c2532012-01-19 16:16:52 +000030#define GR_GL_PER_GL_FUNC_CALLBACK 1
31
32// Check error is even more expensive in chrome (cmd buffer flush). The
33// compositor also doesn't check its allocations.
34#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
bsalomon@google.com56bfc5a2011-09-01 13:28:16 +000035
bsalomon@google.com4bcb0c62012-02-07 16:06:47 +000036// CheckFramebufferStatus in chrome synchronizes the gpu and renderer processes.
37#define GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT 1
38
bsalomon@google.com96966a52013-02-21 16:34:21 +000039// Non-VBO vertices and indices are not allowed in Chromium.
40#define GR_GL_MUST_USE_VBO 1
41
commit-bot@chromium.orge452a0a2013-02-28 17:11:11 +000042// Use updated Khronos signature for glShaderSource
43// (const char* const instead of char**).
bsalomon@google.com26fb61a2013-02-28 19:26:04 +000044#define GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE 1
commit-bot@chromium.orge452a0a2013-02-28 17:11:11 +000045
bsalomon47c1ccb2015-06-24 15:04:13 -070046#if !defined(GR_GL_IGNORE_ES3_MSAA)
47 #define GR_GL_IGNORE_ES3_MSAA 1
48#endif
49
reed@google.combf858b72011-01-19 19:04:04 +000050#endif