Include EXT_window_rectangles API
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221393004
Review-Url: https://codereview.chromium.org/2221393004
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index ea02d21..2c9990f 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -462,6 +462,12 @@
}
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()) {