OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "gl/GrGLInterface.h" | 9 #include "gl/GrGLInterface.h" |
10 #include "gl/GrGLExtensions.h" | 10 #include "gl/GrGLExtensions.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 newInterface->fFunctions.fStencilStrokePathInstanced = NULL; | 52 newInterface->fFunctions.fStencilStrokePathInstanced = NULL; |
53 newInterface->fFunctions.fCoverFillPath = NULL; | 53 newInterface->fFunctions.fCoverFillPath = NULL; |
54 newInterface->fFunctions.fCoverStrokePath = NULL; | 54 newInterface->fFunctions.fCoverStrokePath = NULL; |
55 newInterface->fFunctions.fCoverFillPathInstanced = NULL; | 55 newInterface->fFunctions.fCoverFillPathInstanced = NULL; |
56 newInterface->fFunctions.fCoverStrokePathInstanced = NULL; | 56 newInterface->fFunctions.fCoverStrokePathInstanced = NULL; |
57 newInterface->fFunctions.fStencilThenCoverFillPath = NULL; | 57 newInterface->fFunctions.fStencilThenCoverFillPath = NULL; |
58 newInterface->fFunctions.fStencilThenCoverStrokePath = NULL; | 58 newInterface->fFunctions.fStencilThenCoverStrokePath = NULL; |
59 newInterface->fFunctions.fStencilThenCoverFillPathInstanced = NULL; | 59 newInterface->fFunctions.fStencilThenCoverFillPathInstanced = NULL; |
60 newInterface->fFunctions.fStencilThenCoverStrokePathInstanced = NULL; | 60 newInterface->fFunctions.fStencilThenCoverStrokePathInstanced = NULL; |
61 newInterface->fFunctions.fProgramPathFragmentInputGen = NULL; | 61 newInterface->fFunctions.fProgramPathFragmentInputGen = NULL; |
| 62 newInterface->fFunctions.fBindFragmentInputLocation = NULL; |
62 return newInterface; | 63 return newInterface; |
63 } | 64 } |
64 | 65 |
65 GrGLInterface::GrGLInterface() { | 66 GrGLInterface::GrGLInterface() { |
66 fStandard = kNone_GrGLStandard; | 67 fStandard = kNone_GrGLStandard; |
67 | 68 |
68 #if GR_GL_PER_GL_FUNC_CALLBACK | 69 #if GR_GL_PER_GL_FUNC_CALLBACK |
69 fCallback = GrGLDefaultInterfaceCallback; | 70 fCallback = GrGLDefaultInterfaceCallback; |
70 fCallbackData = 0; | 71 fCallbackData = 0; |
71 #endif | 72 #endif |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 | 477 |
477 if (kGLES_GrGLStandard == fStandard || glVer >= GR_GL_VER(4,1) || | 478 if (kGLES_GrGLStandard == fStandard || glVer >= GR_GL_VER(4,1) || |
478 fExtensions.has("GL_ARB_ES2_compatibility")) { | 479 fExtensions.has("GL_ARB_ES2_compatibility")) { |
479 #if 0 // Enable this once Chrome gives us the function ptr | 480 #if 0 // Enable this once Chrome gives us the function ptr |
480 if (NULL == fFunctions.fGetShaderPrecisionFormat) { | 481 if (NULL == fFunctions.fGetShaderPrecisionFormat) { |
481 RETURN_FALSE_INTERFACE | 482 RETURN_FALSE_INTERFACE |
482 } | 483 } |
483 #endif | 484 #endif |
484 } | 485 } |
485 | 486 |
486 if (fExtensions.has("GL_NV_path_rendering")) { | 487 if (fExtensions.has("GL_NV_path_rendering") || fExtensions.has("GL_CHROMIUM_
path_rendering")) { |
487 if (NULL == fFunctions.fMatrixLoadf || | 488 if (NULL == fFunctions.fMatrixLoadf || |
488 NULL == fFunctions.fMatrixLoadIdentity || | 489 NULL == fFunctions.fMatrixLoadIdentity || |
489 NULL == fFunctions.fPathCommands || | 490 NULL == fFunctions.fPathCommands || |
490 NULL == fFunctions.fPathParameteri || | 491 NULL == fFunctions.fPathParameteri || |
491 NULL == fFunctions.fPathParameterf || | 492 NULL == fFunctions.fPathParameterf || |
492 NULL == fFunctions.fGenPaths || | 493 NULL == fFunctions.fGenPaths || |
493 NULL == fFunctions.fDeletePaths || | 494 NULL == fFunctions.fDeletePaths || |
494 NULL == fFunctions.fIsPath || | 495 NULL == fFunctions.fIsPath || |
495 NULL == fFunctions.fPathStencilFunc || | 496 NULL == fFunctions.fPathStencilFunc || |
496 NULL == fFunctions.fStencilFillPath || | 497 NULL == fFunctions.fStencilFillPath || |
(...skipping 11 matching lines...) Expand all Loading... |
508 // Update this list -> update GrGLCaps::hasPathRenderingSupport too. | 509 // Update this list -> update GrGLCaps::hasPathRenderingSupport too. |
509 || NULL == fFunctions.fStencilThenCoverFillPath || | 510 || NULL == fFunctions.fStencilThenCoverFillPath || |
510 NULL == fFunctions.fStencilThenCoverStrokePath || | 511 NULL == fFunctions.fStencilThenCoverStrokePath || |
511 NULL == fFunctions.fStencilThenCoverFillPathInstanced || | 512 NULL == fFunctions.fStencilThenCoverFillPathInstanced || |
512 NULL == fFunctions.fStencilThenCoverStrokePathInstanced || | 513 NULL == fFunctions.fStencilThenCoverStrokePathInstanced || |
513 NULL == fFunctions.fProgramPathFragmentInputGen | 514 NULL == fFunctions.fProgramPathFragmentInputGen |
514 #endif | 515 #endif |
515 ) { | 516 ) { |
516 RETURN_FALSE_INTERFACE | 517 RETURN_FALSE_INTERFACE |
517 } | 518 } |
| 519 if (fExtensions.has("GL_CHROMIUM_path_rendering")) { |
| 520 if (NULL == fFunctions.fBindFragmentInputLocation) { |
| 521 RETURN_FALSE_INTERFACE |
| 522 } |
| 523 } |
518 } | 524 } |
519 | 525 |
520 if (fExtensions.has("GL_EXT_raster_multisample")) { | 526 if (fExtensions.has("GL_EXT_raster_multisample")) { |
521 if (NULL == fFunctions.fRasterSamples) { | 527 if (NULL == fFunctions.fRasterSamples) { |
522 RETURN_FALSE_INTERFACE | 528 RETURN_FALSE_INTERFACE |
523 } | 529 } |
524 } | 530 } |
525 | 531 |
526 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { | 532 if (fExtensions.has("GL_NV_framebuffer_mixed_samples")) { |
527 if (NULL == fFunctions.fCoverageModulation) { | 533 if (NULL == fFunctions.fCoverageModulation) { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 NULL == fFunctions.fGetDebugMessageLog || | 700 NULL == fFunctions.fGetDebugMessageLog || |
695 NULL == fFunctions.fPushDebugGroup || | 701 NULL == fFunctions.fPushDebugGroup || |
696 NULL == fFunctions.fPopDebugGroup || | 702 NULL == fFunctions.fPopDebugGroup || |
697 NULL == fFunctions.fObjectLabel) { | 703 NULL == fFunctions.fObjectLabel) { |
698 RETURN_FALSE_INTERFACE | 704 RETURN_FALSE_INTERFACE |
699 } | 705 } |
700 } | 706 } |
701 | 707 |
702 return true; | 708 return true; |
703 } | 709 } |
OLD | NEW |