Chromium Code Reviews| Index: src/gpu/gl/GrGLGpu.cpp |
| diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp |
| index 3e44138328d884a36bfbad1e1820f3e0d6fa8aa4..ad19c9457a37775509a2ce3ac354f647906921f5 100644 |
| --- a/src/gpu/gl/GrGLGpu.cpp |
| +++ b/src/gpu/gl/GrGLGpu.cpp |
| @@ -1996,6 +1996,13 @@ void GrGLGpu::flushScissor(const GrScissorState& scissorState, |
| this->disableScissor(); |
| } |
| +// Blah blah blah. |
|
bsalomon
2016/08/22 13:21:57
I like this better.
csmartdalton
2016/08/22 14:10:39
This one doesn't seem to work.. The pragma needs t
|
| +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=5912 |
| +#define HAS_GCC_BUG defined(__GNUC__) && (__GNUC__ < 5) && !defined(__clang__) |
| +#if HAS_GCC_BUG |
| +# pragma GCC diagnostic ignored "-Warray-bounds" |
| +#endif |
| + |
| void GrGLGpu::flushWindowRectangles(const GrWindowRectangles& windows, const GrGLRenderTarget* rt) { |
| typedef GrWindowRectangles::Mode Mode; |
| SkASSERT(windows.count() <= this->caps()->maxWindowRectangles()); |
| @@ -2019,6 +2026,10 @@ void GrGLGpu::flushWindowRectangles(const GrWindowRectangles& windows, const GrG |
| fHWWindowRects.set(rt->origin(), rt->getViewport(), windows); |
| } |
| +#if HAS_GCC_BUG |
| +# pragma GCC diagnostic error "-Warray-bounds" |
| +#endif |
| + |
| void GrGLGpu::disableWindowRectangles() { |
| if (!this->caps()->maxWindowRectangles() || fHWWindowRects.disabled()) { |
| return; |