summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-17 13:38:57 +0000
committerrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-17 13:38:57 +0000
commit9397b696352e81d8b3d217c3983ec4a9e9f9d505 (patch)
tree7657df94e701cf27d25f9bee8793f50bf5c03152
parent9f9fad830750e8cc31821c12b6c14890503d7bef (diff)
downloadsrc-9397b696352e81d8b3d217c3983ec4a9e9f9d505.tar.gz
Fixed unused variable compiler complaint
http://codereview.appspot.com/6496129/ git-svn-id: http://skia.googlecode.com/svn/trunk/src@5567 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--utils/win/SkWGL_win.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/win/SkWGL_win.cpp b/utils/win/SkWGL_win.cpp
index e06c6e42..922ba286 100644
--- a/utils/win/SkWGL_win.cpp
+++ b/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];