Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 2221393004: Include EXT_window_rectangles API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | src/gpu/gl/GrGLDefines.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()) {
« no previous file with comments | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | src/gpu/gl/GrGLDefines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698