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

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

Issue 1626553002: Revert of added support for PLS path rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | « src/gpu/effects/GrPorterDuffXferProcessor.cpp ('k') | src/gpu/gl/GrGLDefines.h » ('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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 glslCaps->fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3, 2) && 277 glslCaps->fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3, 2) &&
278 ctxInfo.glslGeneration() >= k150_GrGLSLGeneration; 278 ctxInfo.glslGeneration() >= k150_GrGLSLGeneration;
279 } 279 }
280 else { 280 else {
281 glslCaps->fDualSourceBlendingSupport = ctxInfo.hasExtension("GL_EXT_blen d_func_extended"); 281 glslCaps->fDualSourceBlendingSupport = ctxInfo.hasExtension("GL_EXT_blen d_func_extended");
282 282
283 glslCaps->fShaderDerivativeSupport = ctxInfo.version() >= GR_GL_VER(3, 0 ) || 283 glslCaps->fShaderDerivativeSupport = ctxInfo.version() >= GR_GL_VER(3, 0 ) ||
284 ctxInfo.hasExtension("GL_OES_standard_derivatives"); 284 ctxInfo.hasExtension("GL_OES_standard_derivatives");
285 } 285 }
286 286
287 if (ctxInfo.hasExtension("GL_EXT_shader_pixel_local_storage")) {
288 #define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63
289 GR_GL_GetIntegerv(gli, GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT,
290 &glslCaps->fPixelLocalStorageSize);
291 glslCaps->fPLSPathRenderingSupport = glslCaps->fFBFetchSupport;
292 }
293 else {
294 glslCaps->fPixelLocalStorageSize = 0;
295 glslCaps->fPLSPathRenderingSupport = false;
296 }
297
298 /************************************************************************** 287 /**************************************************************************
299 * GrCaps fields 288 * GrCaps fields
300 **************************************************************************/ 289 **************************************************************************/
301 290
302 // We need dual source blending and the ability to disable multisample in or der to support mixed 291 // We need dual source blending and the ability to disable multisample in or der to support mixed
303 // samples in every corner case. 292 // samples in every corner case.
304 if (fMultisampleDisableSupport && 293 if (fMultisampleDisableSupport &&
305 glslCaps->dualSourceBlendingSupport() && 294 glslCaps->dualSourceBlendingSupport() &&
306 fShaderCaps->pathRenderingSupport()) { 295 fShaderCaps->pathRenderingSupport()) {
307 fUsesMixedSamples = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sample s") || 296 fUsesMixedSamples = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sample s") ||
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) { 523 void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) {
535 GrGLStandard standard = ctxInfo.standard(); 524 GrGLStandard standard = ctxInfo.standard();
536 GrGLVersion version = ctxInfo.version(); 525 GrGLVersion version = ctxInfo.version();
537 526
538 /************************************************************************** 527 /**************************************************************************
539 * Caps specific to GrGLSLCaps 528 * Caps specific to GrGLSLCaps
540 **************************************************************************/ 529 **************************************************************************/
541 530
542 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get()); 531 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
543 glslCaps->fGLSLGeneration = ctxInfo.glslGeneration(); 532 glslCaps->fGLSLGeneration = ctxInfo.glslGeneration();
533
544 if (kGLES_GrGLStandard == standard) { 534 if (kGLES_GrGLStandard == standard) {
545 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) { 535 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) {
546 glslCaps->fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0)); 536 glslCaps->fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0));
547 glslCaps->fFBFetchSupport = true; 537 glslCaps->fFBFetchSupport = true;
548 glslCaps->fFBFetchColorName = "gl_LastFragData[0]"; 538 glslCaps->fFBFetchColorName = "gl_LastFragData[0]";
549 glslCaps->fFBFetchExtensionString = "GL_EXT_shader_framebuffer_fetch "; 539 glslCaps->fFBFetchExtensionString = "GL_EXT_shader_framebuffer_fetch ";
550 } 540 }
551 else if (ctxInfo.hasExtension("GL_NV_shader_framebuffer_fetch")) { 541 else if (ctxInfo.hasExtension("GL_NV_shader_framebuffer_fetch")) {
552 // Actually, we haven't seen an ES3.0 device with this extension yet , so we don't know 542 // Actually, we haven't seen an ES3.0 device with this extension yet , so we don't know
553 glslCaps->fFBFetchNeedsCustomOutput = false; 543 glslCaps->fFBFetchNeedsCustomOutput = false;
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1594 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1605 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1595 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1606 fConfigTable[i].fFormats.fExternalFormat[j]); 1596 fConfigTable[i].fFormats.fExternalFormat[j]);
1607 } 1597 }
1608 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1598 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1609 } 1599 }
1610 #endif 1600 #endif
1611 } 1601 }
1612 1602
1613 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1603 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « src/gpu/effects/GrPorterDuffXferProcessor.cpp ('k') | src/gpu/gl/GrGLDefines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698