Index: src/gpu/gl/GrGLCaps.cpp |
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp |
index ea02d21c90e46332c215e68da2388535938049f4..2c9990fa257380c2c03039bf0cd62dc437d4959d 100644 |
--- a/src/gpu/gl/GrGLCaps.cpp |
+++ b/src/gpu/gl/GrGLCaps.cpp |
@@ -462,6 +462,12 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, |
} |
fMaxColorSampleCount = fMaxStencilSampleCount; |
+ if (ctxInfo.hasExtension("GL_EXT_window_rectangles")) { |
+ GR_GL_GetIntegerv(gli, GR_GL_MAX_WINDOW_RECTANGLES, &fMaxWindowRectangles); |
+ // Protect ourselves against tracking huge amounts of window rectangle state. |
+ fMaxWindowRectangles = SkTMin(31, fMaxWindowRectangles); |
+ } |
+ |
if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() || |
kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() || |
kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) { |