1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/include/gpu/gl/GrGLConfig_chrome.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,54 @@ 1.4 + 1.5 +/* 1.6 + * Copyright 2011 Google Inc. 1.7 + * 1.8 + * Use of this source code is governed by a BSD-style license that can be 1.9 + * found in the LICENSE file. 1.10 + */ 1.11 +#ifndef GrGLConfig_chrome_DEFINED 1.12 +#define GrGLConfig_chrome_DEFINED 1.13 + 1.14 +// glGetError() forces a sync with gpu process on chrome 1.15 +#define GR_GL_CHECK_ERROR_START 0 1.16 + 1.17 +#if defined(SK_BUILD_FOR_WIN32) 1.18 +// ANGLE creates a temp VB for vertex attributes not specified per-vertex. 1.19 +#define GR_GL_NO_CONSTANT_ATTRIBUTES 1 1.20 + 1.21 +// For RGBA teximage/readpixels ANGLE will sw-convert to/from BGRA. 1.22 +#define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 1 1.23 + 1.24 +// ANGLE can go faster if the entire fbo is read rather than a subrect 1.25 +#define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 1 1.26 +#else 1.27 +#define GR_GL_NO_CONSTANT_ATTRIBUTES 0 1.28 +#define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 0 1.29 +#define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 0 1.30 +#endif 1.31 + 1.32 +// cmd buffer allocates memory and memsets it to zero when it sees glBufferData 1.33 +// with NULL. 1.34 +#define GR_GL_USE_BUFFER_DATA_NULL_HINT 0 1.35 + 1.36 +// chrome uses this to set the context on each GL call. 1.37 +#define GR_GL_PER_GL_FUNC_CALLBACK 1 1.38 + 1.39 +// Check error is even more expensive in chrome (cmd buffer flush). The 1.40 +// compositor also doesn't check its allocations. 1.41 +#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 1.42 + 1.43 +// CheckFramebufferStatus in chrome synchronizes the gpu and renderer processes. 1.44 +#define GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT 1 1.45 + 1.46 +// Non-VBO vertices and indices are not allowed in Chromium. 1.47 +#define GR_GL_MUST_USE_VBO 1 1.48 + 1.49 +// Use updated Khronos signature for glShaderSource 1.50 +// (const char* const instead of char**). 1.51 +#define GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE 1 1.52 + 1.53 +#if !defined(GR_GL_IGNORE_ES3_MSAA) 1.54 + #define GR_GL_IGNORE_ES3_MSAA 1 1.55 +#endif 1.56 + 1.57 +#endif