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