Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | |
michael@0 | 2 | /* |
michael@0 | 3 | * Copyright 2011 Google Inc. |
michael@0 | 4 | * |
michael@0 | 5 | * Use of this source code is governed by a BSD-style license that can be |
michael@0 | 6 | * found in the LICENSE file. |
michael@0 | 7 | */ |
michael@0 | 8 | #ifndef GrGLConfig_chrome_DEFINED |
michael@0 | 9 | #define GrGLConfig_chrome_DEFINED |
michael@0 | 10 | |
michael@0 | 11 | // glGetError() forces a sync with gpu process on chrome |
michael@0 | 12 | #define GR_GL_CHECK_ERROR_START 0 |
michael@0 | 13 | |
michael@0 | 14 | #if defined(SK_BUILD_FOR_WIN32) |
michael@0 | 15 | // ANGLE creates a temp VB for vertex attributes not specified per-vertex. |
michael@0 | 16 | #define GR_GL_NO_CONSTANT_ATTRIBUTES 1 |
michael@0 | 17 | |
michael@0 | 18 | // For RGBA teximage/readpixels ANGLE will sw-convert to/from BGRA. |
michael@0 | 19 | #define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 1 |
michael@0 | 20 | |
michael@0 | 21 | // ANGLE can go faster if the entire fbo is read rather than a subrect |
michael@0 | 22 | #define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 1 |
michael@0 | 23 | #else |
michael@0 | 24 | #define GR_GL_NO_CONSTANT_ATTRIBUTES 0 |
michael@0 | 25 | #define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 0 |
michael@0 | 26 | #define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 0 |
michael@0 | 27 | #endif |
michael@0 | 28 | |
michael@0 | 29 | // cmd buffer allocates memory and memsets it to zero when it sees glBufferData |
michael@0 | 30 | // with NULL. |
michael@0 | 31 | #define GR_GL_USE_BUFFER_DATA_NULL_HINT 0 |
michael@0 | 32 | |
michael@0 | 33 | // chrome uses this to set the context on each GL call. |
michael@0 | 34 | #define GR_GL_PER_GL_FUNC_CALLBACK 1 |
michael@0 | 35 | |
michael@0 | 36 | // Check error is even more expensive in chrome (cmd buffer flush). The |
michael@0 | 37 | // compositor also doesn't check its allocations. |
michael@0 | 38 | #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 |
michael@0 | 39 | |
michael@0 | 40 | // CheckFramebufferStatus in chrome synchronizes the gpu and renderer processes. |
michael@0 | 41 | #define GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT 1 |
michael@0 | 42 | |
michael@0 | 43 | // Non-VBO vertices and indices are not allowed in Chromium. |
michael@0 | 44 | #define GR_GL_MUST_USE_VBO 1 |
michael@0 | 45 | |
michael@0 | 46 | // Use updated Khronos signature for glShaderSource |
michael@0 | 47 | // (const char* const instead of char**). |
michael@0 | 48 | #define GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE 1 |
michael@0 | 49 | |
michael@0 | 50 | #if !defined(GR_GL_IGNORE_ES3_MSAA) |
michael@0 | 51 | #define GR_GL_IGNORE_ES3_MSAA 1 |
michael@0 | 52 | #endif |
michael@0 | 53 | |
michael@0 | 54 | #endif |