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

Side by Side Diff: src/utils/win/SkWGL_win.cpp

Issue 27192003: Start cleaning up 64bit Win warnings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: revertedGrBytesPerPixel to returning a size_t Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/utils/SkDumpCanvas.cpp ('k') | tools/skdiff_utils.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkWGL.h" 9 #include "SkWGL.h"
10 10
11 #include "SkTDArray.h" 11 #include "SkTDArray.h"
12 #include "SkTSearch.h" 12 #include "SkTSearch.h"
13 #include "SkTSort.h" 13 #include "SkTSort.h"
14 14
15 bool SkWGLExtensions::hasExtension(HDC dc, const char* ext) const { 15 bool SkWGLExtensions::hasExtension(HDC dc, const char* ext) const {
16 if (NULL == this->fGetExtensionsString) { 16 if (NULL == this->fGetExtensionsString) {
17 return false; 17 return false;
18 } 18 }
19 if (!strcmp("WGL_ARB_extensions_string", ext)) { 19 if (!strcmp("WGL_ARB_extensions_string", ext)) {
20 return true; 20 return true;
21 } 21 }
22 const char* extensionString = this->getExtensionsString(dc); 22 const char* extensionString = this->getExtensionsString(dc);
23 int extLength = strlen(ext); 23 size_t extLength = strlen(ext);
24 24
25 while (true) { 25 while (true) {
26 int n = strcspn(extensionString, " "); 26 size_t n = strcspn(extensionString, " ");
27 if (n == extLength && 0 == strncmp(ext, extensionString, n)) { 27 if (n == extLength && 0 == strncmp(ext, extensionString, n)) {
28 return true; 28 return true;
29 } 29 }
30 if (0 == extensionString[n]) { 30 if (0 == extensionString[n]) {
31 return false; 31 return false;
32 } 32 }
33 extensionString += n+1; 33 extensionString += n+1;
34 } 34 }
35 35
36 return false; 36 return false;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 333 }
334 334
335 if (NULL == glrc) { 335 if (NULL == glrc) {
336 glrc = wglCreateContext(dc); 336 glrc = wglCreateContext(dc);
337 } 337 }
338 SkASSERT(glrc); 338 SkASSERT(glrc);
339 339
340 wglMakeCurrent(prevDC, prevGLRC); 340 wglMakeCurrent(prevDC, prevGLRC);
341 return glrc; 341 return glrc;
342 } 342 }
OLDNEW
« no previous file with comments | « src/utils/SkDumpCanvas.cpp ('k') | tools/skdiff_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698