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

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

Issue 1427583007: Assert when running SampleApp with msaa 16 on Windows 10 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Review comments processing Created 5 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | 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
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return true; 116 return true;
117 } 117 }
118 return false; 118 return false;
119 } 119 }
120 } 120 }
121 121
122 int SkWGLExtensions::selectFormat(const int formats[], 122 int SkWGLExtensions::selectFormat(const int formats[],
123 int formatCount, 123 int formatCount,
124 HDC dc, 124 HDC dc,
125 int desiredSampleCount) const { 125 int desiredSampleCount) const {
126 if (formatCount <= 0) {
127 return -1;
128 }
126 PixelFormat desiredFormat = { 129 PixelFormat desiredFormat = {
127 0, 130 0,
128 desiredSampleCount, 131 desiredSampleCount,
129 0, 132 0,
130 }; 133 };
131 SkTDArray<PixelFormat> rankedFormats; 134 SkTDArray<PixelFormat> rankedFormats;
132 rankedFormats.setCount(formatCount); 135 rankedFormats.setCount(formatCount);
133 for (int i = 0; i < formatCount; ++i) { 136 for (int i = 0; i < formatCount; ++i) {
134 static const int kQueryAttr = SK_WGL_SAMPLES; 137 static const int kQueryAttr = SK_WGL_SAMPLES;
135 int numSamples; 138 int numSamples;
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 wglDeleteContext(fGLRC); 451 wglDeleteContext(fGLRC);
449 fExtensions.releasePbufferDC(fPbuffer, fDC); 452 fExtensions.releasePbufferDC(fPbuffer, fDC);
450 fExtensions.destroyPbuffer(fPbuffer); 453 fExtensions.destroyPbuffer(fPbuffer);
451 } 454 }
452 455
453 SkWGLPbufferContext::SkWGLPbufferContext(HPBUFFER pbuffer, HDC dc, HGLRC glrc) 456 SkWGLPbufferContext::SkWGLPbufferContext(HPBUFFER pbuffer, HDC dc, HGLRC glrc)
454 : fPbuffer(pbuffer) 457 : fPbuffer(pbuffer)
455 , fDC(dc) 458 , fDC(dc)
456 , fGLRC(glrc) { 459 , fGLRC(glrc) {
457 } 460 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698