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

Side by Side Diff: src/gpu/GrContextFactory.cpp

Issue 1235283004: Various GL testing fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « gm/imagefromyuvtextures.cpp ('k') | tests/ResourceCacheTest.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 2014 Google Inc. 3 * Copyright 2014 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 "GrContextFactory.h" 9 #include "GrContextFactory.h"
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 glCtx->makeCurrent(); 77 glCtx->makeCurrent();
78 GrBackendContext p3dctx = reinterpret_cast<GrBackendContext>(glInterface.get ()); 78 GrBackendContext p3dctx = reinterpret_cast<GrBackendContext>(glInterface.get ());
79 grCtx.reset(GrContext::Create(kOpenGL_GrBackend, p3dctx, fGlobalOptions)); 79 grCtx.reset(GrContext::Create(kOpenGL_GrBackend, p3dctx, fGlobalOptions));
80 if (!grCtx.get()) { 80 if (!grCtx.get()) {
81 return NULL; 81 return NULL;
82 } 82 }
83 // Warn if path rendering support is not available for the NVPR type. 83 // Warn if path rendering support is not available for the NVPR type.
84 if (kNVPR_GLContextType == type) { 84 if (kNVPR_GLContextType == type) {
85 if (!grCtx->caps()->shaderCaps()->pathRenderingSupport()) { 85 if (!grCtx->caps()->shaderCaps()->pathRenderingSupport()) {
86 GrGLGpu* gpu = static_cast<GrGLGpu*>(grCtx->getGpu()); 86 GrGpu* gpu = grCtx->getGpu();
87 const GrGLubyte* verUByte; 87 const GrGLContext* ctx = gpu->glContextForTesting();
88 GR_GL_CALL_RET(gpu->glInterface(), verUByte, GetString(GR_GL_VERSION )); 88 if (ctx) {
89 const char* ver = reinterpret_cast<const char*>(verUByte); 89 const GrGLubyte* verUByte;
90 SkDebugf("\nWARNING: nvprmsaa config requested, but driver path rend ering support not" 90 GR_GL_CALL_RET(ctx->interface(), verUByte, GetString(GR_GL_VERSI ON));
91 " available. Maybe update the driver? Your driver version s tring: \"%s\"\n", ver); 91 const char* ver = reinterpret_cast<const char*>(verUByte);
92 SkDebugf("\nWARNING: nvprmsaa config requested, but driver path rendering "
93 "support not available. Maybe update the driver? Your d river version "
94 "string: \"%s\"\n", ver);
95 } else {
96 SkDebugf("\nWARNING: nvprmsaa config requested, but driver path rendering "
97 "support not available.\n");
98 }
92 } 99 }
93 } 100 }
94 101
95 GPUContext& ctx = fContexts.push_back(); 102 GPUContext& ctx = fContexts.push_back();
96 ctx.fGLContext = glCtx.get(); 103 ctx.fGLContext = glCtx.get();
97 ctx.fGLContext->ref(); 104 ctx.fGLContext->ref();
98 ctx.fGrContext = grCtx.get(); 105 ctx.fGrContext = grCtx.get();
99 ctx.fGrContext->ref(); 106 ctx.fGrContext->ref();
100 ctx.fType = type; 107 ctx.fType = type;
101 return ctx.fGrContext; 108 return ctx.fGrContext;
102 } 109 }
OLDNEW
« no previous file with comments | « gm/imagefromyuvtextures.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698