epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | |
| 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.com | bf858b7 | 2011-01-19 19:04:04 +0000 | [diff] [blame] | 8 | #ifndef GrGLConfig_chrome_DEFINED |
| 9 | #define GrGLConfig_chrome_DEFINED |
| 10 | |
bsalomon@google.com | 3723a48 | 2011-02-17 21:47:25 +0000 | [diff] [blame] | 11 | // glGetError() forces a sync with gpu process on chrome |
bsalomon@google.com | 4f3c253 | 2012-01-19 16:16:52 +0000 | [diff] [blame] | 12 | #define GR_GL_CHECK_ERROR_START 0 |
bsalomon@google.com | 4be283f | 2011-04-19 21:15:09 +0000 | [diff] [blame] | 13 | |
commit-bot@chromium.org | 4382330 | 2013-09-25 20:57:51 +0000 | [diff] [blame^] | 14 | #if defined(SK_BUILD_FOR_WIN32) |
bsalomon@google.com | 4be283f | 2011-04-19 21:15:09 +0000 | [diff] [blame] | 15 | // ANGLE creates a temp VB for vertex attributes not specified per-vertex. |
commit-bot@chromium.org | 4382330 | 2013-09-25 20:57:51 +0000 | [diff] [blame^] | 16 | #define GR_GL_NO_CONSTANT_ATTRIBUTES 1 |
bsalomon@google.com | 3723a48 | 2011-02-17 21:47:25 +0000 | [diff] [blame] | 17 | |
bsalomon@google.com | a85449d | 2011-11-19 02:36:05 +0000 | [diff] [blame] | 18 | // For RGBA teximage/readpixels ANGLE will sw-convert to/from BGRA. |
commit-bot@chromium.org | 4382330 | 2013-09-25 20:57:51 +0000 | [diff] [blame^] | 19 | #define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 1 |
bsalomon@google.com | 0a97be2 | 2011-11-08 19:20:57 +0000 | [diff] [blame] | 20 | |
bsalomon@google.com | 56d11e0 | 2011-11-30 19:59:08 +0000 | [diff] [blame] | 21 | // ANGLE can go faster if the entire fbo is read rather than a subrect |
commit-bot@chromium.org | 4382330 | 2013-09-25 20:57:51 +0000 | [diff] [blame^] | 22 | #define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 1 |
| 23 | #else |
| 24 | #define GR_GL_NO_CONSTANT_ATTRIBUTES 0 |
| 25 | #define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 0 |
| 26 | #define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 0 |
| 27 | #endif |
bsalomon@google.com | 56d11e0 | 2011-11-30 19:59:08 +0000 | [diff] [blame] | 28 | |
bsalomon@google.com | 9ae4429 | 2011-07-01 15:21:59 +0000 | [diff] [blame] | 29 | // cmd buffer allocates memory and memsets it to zero when it sees glBufferData |
| 30 | // with NULL. |
bsalomon@google.com | 4f3c253 | 2012-01-19 16:16:52 +0000 | [diff] [blame] | 31 | #define GR_GL_USE_BUFFER_DATA_NULL_HINT 0 |
bsalomon@google.com | 9ae4429 | 2011-07-01 15:21:59 +0000 | [diff] [blame] | 32 | |
bsalomon@google.com | 56bfc5a | 2011-09-01 13:28:16 +0000 | [diff] [blame] | 33 | // chrome uses this to set the context on each GL call. |
bsalomon@google.com | 4f3c253 | 2012-01-19 16:16:52 +0000 | [diff] [blame] | 34 | #define GR_GL_PER_GL_FUNC_CALLBACK 1 |
| 35 | |
| 36 | // Check error is even more expensive in chrome (cmd buffer flush). The |
| 37 | // compositor also doesn't check its allocations. |
| 38 | #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 |
bsalomon@google.com | 56bfc5a | 2011-09-01 13:28:16 +0000 | [diff] [blame] | 39 | |
bsalomon@google.com | 4bcb0c6 | 2012-02-07 16:06:47 +0000 | [diff] [blame] | 40 | // CheckFramebufferStatus in chrome synchronizes the gpu and renderer processes. |
| 41 | #define GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT 1 |
| 42 | |
bsalomon@google.com | 96966a5 | 2013-02-21 16:34:21 +0000 | [diff] [blame] | 43 | // Non-VBO vertices and indices are not allowed in Chromium. |
| 44 | #define GR_GL_MUST_USE_VBO 1 |
| 45 | |
commit-bot@chromium.org | e452a0a | 2013-02-28 17:11:11 +0000 | [diff] [blame] | 46 | // Use updated Khronos signature for glShaderSource |
| 47 | // (const char* const instead of char**). |
bsalomon@google.com | 26fb61a | 2013-02-28 19:26:04 +0000 | [diff] [blame] | 48 | #define GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE 1 |
commit-bot@chromium.org | e452a0a | 2013-02-28 17:11:11 +0000 | [diff] [blame] | 49 | |
commit-bot@chromium.org | a8e5a06 | 2013-09-05 23:44:09 +0000 | [diff] [blame] | 50 | #if !defined(GR_GL_IGNORE_ES3_MSAA) |
| 51 | #define GR_GL_IGNORE_ES3_MSAA 1 |
| 52 | #endif |
| 53 | |
reed@google.com | bf858b7 | 2011-01-19 19:04:04 +0000 | [diff] [blame] | 54 | #endif |