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

Side by Side Diff: src/gpu/gl/GrGLCaps.cpp

Issue 14314008: Add FontMgr to DirectWrite. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Add matcher, fix GrGLCaps. Created 7 years, 7 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 | « include/utils/win/SkTScopedComPtr.h ('k') | src/ports/SkFontHost_win_dw.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "GrGLCaps.h" 9 #include "GrGLCaps.h"
10 #include "GrGLContext.h" 10 #include "GrGLContext.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 * GrDrawTargetCaps fields 212 * GrDrawTargetCaps fields
213 **************************************************************************/ 213 **************************************************************************/
214 GrGLint maxTextureUnits; 214 GrGLint maxTextureUnits;
215 // check FS and fixed-function texture unit limits 215 // check FS and fixed-function texture unit limits
216 // we only use textures in the fragment stage currently. 216 // we only use textures in the fragment stage currently.
217 // checks are > to make sure we have a spare unit. 217 // checks are > to make sure we have a spare unit.
218 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_IMAGE_UNITS, &maxTextureUnits); 218 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_IMAGE_UNITS, &maxTextureUnits);
219 219
220 GrGLint numFormats; 220 GrGLint numFormats;
221 GR_GL_GetIntegerv(gli, GR_GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numFormats); 221 GR_GL_GetIntegerv(gli, GR_GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numFormats);
222 SkAutoSTMalloc<10, GrGLint> formats(numFormats); 222 if (numFormats) {
bungeman-skia 2013/04/29 22:59:06 The 'debug' gl context sets numFormats to 0.
223 GR_GL_GetIntegerv(gli, GR_GL_COMPRESSED_TEXTURE_FORMATS, formats); 223 SkAutoSTMalloc<10, GrGLint> formats(numFormats);
bungeman-skia 2013/04/29 22:59:06 The new SkAutoSTMalloc fPtr is NULL when construct
224 for (int i = 0; i < numFormats; ++i) { 224 GR_GL_GetIntegerv(gli, GR_GL_COMPRESSED_TEXTURE_FORMATS, formats);
bungeman-skia 2013/04/29 22:59:06 The first thing GR_GL_GetIntegerv does is *format
225 if (formats[i] == GR_GL_PALETTE8_RGBA8) { 225 for (int i = 0; i < numFormats; ++i) {
226 f8BitPaletteSupport = true; 226 if (formats[i] == GR_GL_PALETTE8_RGBA8) {
227 break; 227 f8BitPaletteSupport = true;
228 break;
229 }
228 } 230 }
229 } 231 }
230 232
231 if (kDesktop_GrGLBinding == binding) { 233 if (kDesktop_GrGLBinding == binding) {
232 // we could also look for GL_ATI_separate_stencil extension or 234 // we could also look for GL_ATI_separate_stencil extension or
233 // GL_EXT_stencil_two_side but they use different function signatures 235 // GL_EXT_stencil_two_side but they use different function signatures
234 // than GL2.0+ (and than each other). 236 // than GL2.0+ (and than each other).
235 fTwoSidedStencilSupport = (ctxInfo.version() >= GR_GL_VER(2,0)); 237 fTwoSidedStencilSupport = (ctxInfo.version() >= GR_GL_VER(2,0));
236 // supported on GL 1.4 and higher or by extension 238 // supported on GL 1.4 and higher or by extension
237 fStencilWrapOpsSupport = (ctxInfo.version() >= GR_GL_VER(1,4)) || 239 fStencilWrapOpsSupport = (ctxInfo.version() >= GR_GL_VER(1,4)) ||
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); 549 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO"));
548 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 550 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
549 GrPrintf("Fragment coord conventions support: %s\n", 551 GrPrintf("Fragment coord conventions support: %s\n",
550 (fFragCoordsConventionSupport ? "YES": "NO")); 552 (fFragCoordsConventionSupport ? "YES": "NO"));
551 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO")); 553 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO"));
552 GrPrintf("Use non-VBO for dynamic data: %s\n", 554 GrPrintf("Use non-VBO for dynamic data: %s\n",
553 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 555 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
554 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); 556 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO"));
555 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO")); 557 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO"));
556 } 558 }
OLDNEW
« no previous file with comments | « include/utils/win/SkTScopedComPtr.h ('k') | src/ports/SkFontHost_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698