Workaround for https://bugs.webkit.org/show_bug.cgi?id=237906
This commit is contained in:
+8
-1
@@ -2,6 +2,7 @@
|
||||
* @module ol/webgl
|
||||
*/
|
||||
|
||||
import {SAFARI_BUG_237906} from './has.js';
|
||||
import {assign} from './obj.js';
|
||||
|
||||
/**
|
||||
@@ -91,7 +92,13 @@ const CONTEXT_IDS = ['experimental-webgl', 'webgl', 'webkit-3d', 'moz-webgl'];
|
||||
* @return {WebGLRenderingContext} WebGL rendering context.
|
||||
*/
|
||||
export function getContext(canvas, opt_attributes) {
|
||||
const attributes = assign({preserveDrawingBuffer: true}, opt_attributes);
|
||||
const attributes = assign(
|
||||
{
|
||||
preserveDrawingBuffer: true,
|
||||
antialias: SAFARI_BUG_237906 ? false : true, // https://bugs.webkit.org/show_bug.cgi?id=237906
|
||||
},
|
||||
opt_attributes
|
||||
);
|
||||
const ii = CONTEXT_IDS.length;
|
||||
for (let i = 0; i < ii; ++i) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user