aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-17 13:38:57 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-17 13:38:57 +0000
commitf92cfcf3628ad455ad2e11011db5573563447688 (patch)
tree7dc9a07a305912ca832d08a8e1cd9a0c648649a7
parent31f8f73e83fad2241b1350d8d253c170e96e46ff (diff)
Fixed unused variable compiler complaint
-rw-r--r--src/utils/win/SkWGL_win.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/utils/win/SkWGL_win.cpp b/src/utils/win/SkWGL_win.cpp
index e06c6e42f2..922ba286d8 100644
--- a/src/utils/win/SkWGL_win.cpp
+++ b/src/utils/win/SkWGL_win.cpp
@@ -118,14 +118,17 @@ int SkWGLExtensions::selectFormat(const int formats[],
for (int i = 0; i < formatCount; ++i) {
static const int queryAttrs[] = {
SK_WGL_COVERAGE_SAMPLES,
+ // Keep COLOR_SAMPLES at the end so it can be skipped
SK_WGL_COLOR_SAMPLES,
};
int answers[2];
- int queryAttrCnt = supportsCoverage ? 2 : 1;
+ int queryAttrCnt = supportsCoverage ?
+ SK_ARRAY_COUNT(queryAttrs) :
+ SK_ARRAY_COUNT(queryAttrs) - 1;
this->getPixelFormatAttribiv(dc,
formats[i],
0,
- SK_ARRAY_COUNT(queryAttrs),
+ queryAttrCnt,
queryAttrs,
answers);
rankedFormats[i].fFormat = formats[i];