diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-02-07 16:06:47 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-02-07 16:06:47 +0000 |
commit | 4bcb0c6e0377557d326344f4bd2bbab4e8b1bc3a (patch) | |
tree | f7b198199b11281b93b635e905fb0c0aa3776f39 /include | |
parent | 0439e569969d560e1c6d1716c8cb3d29b82305f9 (diff) |
Reland 3144 with assertion fix.
git-svn-id: http://skia.googlecode.com/svn/trunk@3146 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrGLConfig.h | 33 | ||||
-rw-r--r-- | include/gpu/GrGLConfig_chrome.h | 3 | ||||
-rw-r--r-- | include/gpu/GrTypes.h | 2 |
3 files changed, 27 insertions, 11 deletions
diff --git a/include/gpu/GrGLConfig.h b/include/gpu/GrGLConfig.h index 167c8eb072..5ae931c607 100644 --- a/include/gpu/GrGLConfig.h +++ b/include/gpu/GrGLConfig.h @@ -92,50 +92,61 @@ * amounts to ensuring the error is GL_NO_ERROR, calling the allocating * function, and then checking that the error is still GL_NO_ERROR. When the * value is 0 we will assume no error was generated without checking. + * + * GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT: We will normally check the FBO status + * every time we bind a texture or renderbuffer to an FBO. However, in some + * environments CheckFrameBufferStatus is very expensive. If this is set we will + * check the first time we use a color format or a combination of color / + * stencil formats as attachments. If the FBO is complete we will assume + * subsequent attachments with the same formats are complete as well. */ #if !defined(GR_GL_LOG_CALLS) - #define GR_GL_LOG_CALLS GR_DEBUG + #define GR_GL_LOG_CALLS GR_DEBUG #endif #if !defined(GR_GL_LOG_CALLS_START) - #define GR_GL_LOG_CALLS_START 0 + #define GR_GL_LOG_CALLS_START 0 #endif #if !defined(GR_GL_CHECK_ERROR) - #define GR_GL_CHECK_ERROR GR_DEBUG + #define GR_GL_CHECK_ERROR GR_DEBUG #endif #if !defined(GR_GL_CHECK_ERROR_START) - #define GR_GL_CHECK_ERROR_START 1 + #define GR_GL_CHECK_ERROR_START 1 #endif #if !defined(GR_GL_NO_CONSTANT_ATTRIBUTES) - #define GR_GL_NO_CONSTANT_ATTRIBUTES 0 + #define GR_GL_NO_CONSTANT_ATTRIBUTES 0 #endif #if !defined(GR_GL_ATTRIBUTE_MATRICES) - #define GR_GL_ATTRIBUTE_MATRICES 0 + #define GR_GL_ATTRIBUTE_MATRICES 0 #endif #if !defined(GR_GL_USE_BUFFER_DATA_NULL_HINT) - #define GR_GL_USE_BUFFER_DATA_NULL_HINT 1 + #define GR_GL_USE_BUFFER_DATA_NULL_HINT 1 #endif #if !defined(GR_GL_PER_GL_FUNC_CALLBACK) - #define GR_GL_PER_GL_FUNC_CALLBACK 0 + #define GR_GL_PER_GL_FUNC_CALLBACK 0 #endif #if !defined(GR_GL_RGBA_8888_PIXEL_OPS_SLOW) - #define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 0 + #define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 0 #endif #if !defined(GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL) - #define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 0 + #define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 0 #endif #if !defined(GR_GL_CHECK_ALLOC_WITH_GET_ERROR) - #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 1 + #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 1 +#endif + +#if !defined(GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT) + #define GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT 0 #endif #if(GR_GL_NO_CONSTANT_ATTRIBUTES) && (GR_GL_ATTRIBUTE_MATRICES) diff --git a/include/gpu/GrGLConfig_chrome.h b/include/gpu/GrGLConfig_chrome.h index 2bae14579e..50ea34c6d3 100644 --- a/include/gpu/GrGLConfig_chrome.h +++ b/include/gpu/GrGLConfig_chrome.h @@ -31,4 +31,7 @@ // compositor also doesn't check its allocations. #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0 +// CheckFramebufferStatus in chrome synchronizes the gpu and renderer processes. +#define GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT 1 + #endif diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h index 9f245d944a..f6809d6ca4 100644 --- a/include/gpu/GrTypes.h +++ b/include/gpu/GrTypes.h @@ -301,6 +301,8 @@ enum GrPixelConfig { * Unpremultiplied. Byte order is b,g,r,a */ kBGRA_8888_UPM_GrPixelConfig, + + kGrPixelConfigCount }; // Aliases for pixel configs that match skia's byte order |