Assert when running SampleApp with msaa 16 on Windows 10
Trivial: skip calling SkWGLExtensions::selectFormat with 0 elements,
and handle if called.
BUG=4529
Review URL: https://codereview.chromium.org/1427583007
diff --git a/src/utils/win/SkWGL_win.cpp b/src/utils/win/SkWGL_win.cpp
index bc22795..5afcae9 100644
--- a/src/utils/win/SkWGL_win.cpp
+++ b/src/utils/win/SkWGL_win.cpp
@@ -126,6 +126,9 @@
int formatCount,
HDC dc,
int desiredSampleCount) const {
+ if (formatCount <= 0) {
+ return -1;
+ }
PixelFormat desiredFormat = {
0,
desiredSampleCount,