boost.js 798 B

1234567891011121314151617181920212223242526272829303132
  1. /* *
  2. *
  3. * Copyright (c) 2019-2019 Highsoft AS
  4. *
  5. * Boost module: stripped-down renderer for higher performance
  6. *
  7. * License: highcharts.com/license
  8. *
  9. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  10. *
  11. * */
  12. 'use strict';
  13. import H from '../../parts/Globals.js';
  14. import butils from './boost-utils.js';
  15. import init from './boost-init.js';
  16. import './boost-overrides.js';
  17. import './named-colors.js';
  18. // These need to be fixed when we support named imports
  19. var hasWebGLSupport = butils.hasWebGLSupport;
  20. if (!hasWebGLSupport()) {
  21. if (typeof H.initCanvasBoost !== 'undefined') {
  22. // Fallback to canvas boost
  23. H.initCanvasBoost();
  24. }
  25. else {
  26. H.error(26);
  27. }
  28. }
  29. else {
  30. // WebGL support is alright, and we're good to go.
  31. init();
  32. }