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

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

Issue 1223673002: Revert of Implement support for CHROMIUM_path_rendering pseudo extension (Closed) Base URL: https://skia.googlesource.com/skia.git@chromium-pathrendering-prepare-03
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 | « include/gpu/gl/GrGLInterface.h ('k') | src/gpu/gl/GrGLInterface.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 10
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 457
458 this->initConfigTexturableTable(ctxInfo, gli); 458 this->initConfigTexturableTable(ctxInfo, gli);
459 this->initConfigRenderableTable(ctxInfo); 459 this->initConfigRenderableTable(ctxInfo);
460 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps); 460 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps);
461 461
462 this->applyOptionsOverrides(contextOptions); 462 this->applyOptionsOverrides(contextOptions);
463 glslCaps->applyOptionsOverrides(contextOptions); 463 glslCaps->applyOptionsOverrides(contextOptions);
464 } 464 }
465 465
466 bool GrGLCaps::hasPathRenderingSupport(const GrGLContextInfo& ctxInfo, const GrG LInterface* gli) { 466 bool GrGLCaps::hasPathRenderingSupport(const GrGLContextInfo& ctxInfo, const GrG LInterface* gli) {
467 bool hasChromiumPathRendering = ctxInfo.hasExtension("GL_CHROMIUM_path_rende ring"); 467 if (!ctxInfo.hasExtension("GL_NV_path_rendering")) {
468
469 if (!(ctxInfo.hasExtension("GL_NV_path_rendering") || hasChromiumPathRenderi ng)) {
470 return false; 468 return false;
471 } 469 }
472
473 if (kGL_GrGLStandard == ctxInfo.standard()) { 470 if (kGL_GrGLStandard == ctxInfo.standard()) {
474 if (ctxInfo.version() < GR_GL_VER(4, 3) && 471 if (ctxInfo.version() < GR_GL_VER(4, 3) &&
475 !ctxInfo.hasExtension("GL_ARB_program_interface_query")) { 472 !ctxInfo.hasExtension("GL_ARB_program_interface_query")) {
476 return false; 473 return false;
477 } 474 }
478 } else { 475 } else {
479 if (!hasChromiumPathRendering && 476 if (ctxInfo.version() < GR_GL_VER(3, 1)) {
480 ctxInfo.version() < GR_GL_VER(3, 1)) {
481 return false; 477 return false;
482 } 478 }
483 } 479 }
484 // We only support v1.3+ of GL_NV_path_rendering which allows us to 480 // We only support v1.3+ of GL_NV_path_rendering which allows us to
485 // set individual fragment inputs with ProgramPathFragmentInputGen. The API 481 // set individual fragment inputs with ProgramPathFragmentInputGen. The API
486 // additions are detected by checking the existence of the function. 482 // additions are detected by checking the existence of the function.
487 // We also use *Then* functions that not all drivers might have. Check 483 // We also use *Then* functions that not all drivers might have. Check
488 // them for consistency. 484 // them for consistency.
489 if (NULL == gli->fFunctions.fStencilThenCoverFillPath || 485 if (NULL == gli->fFunctions.fStencilThenCoverFillPath ||
490 NULL == gli->fFunctions.fStencilThenCoverStrokePath || 486 NULL == gli->fFunctions.fStencilThenCoverStrokePath ||
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 for (int p = 0; p < kGrSLPrecisionCount; ++p) { 1194 for (int p = 0; p < kGrSLPrecisionCount; ++p) {
1199 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = 1195 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] =
1200 glslCaps->fFloatPrecisions[kVerte x_GrShaderType][p]; 1196 glslCaps->fFloatPrecisions[kVerte x_GrShaderType][p];
1201 } 1197 }
1202 } 1198 }
1203 } 1199 }
1204 1200
1205 1201
1206 1202
1207 1203
OLDNEW
« no previous file with comments | « include/gpu/gl/GrGLInterface.h ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698