function isBrokenDiagonalRendering() {
  if (brokenDiagonalRendering_ === undefined) {
    const ctx = document.createElement('canvas').getContext('2d');
    ctx.globalCompositeOperation = 'lighter';
    ctx.fillStyle = 'rgba(210, 0, 0, 0.75)';
    drawTestTriangle(ctx, 4, 5, 4, 0);
    drawTestTriangle(ctx, 4, 5, 0, 5);
    const data = ctx.getImageData(0, 0, 3, 3).data;
    brokenDiagonalRendering_ =
      verifyBrokenDiagonalRendering(data, 0) ||
      verifyBrokenDiagonalRendering(data, 4) ||
      verifyBrokenDiagonalRendering(data, 8);
  }

  return brokenDiagonalRendering_;
}
/**
 * Determines if the current browser configuration can render triangular clip regions correctly.
 * This value is cached so the function is only expensive the first time called.
 * Firefox on Windows (as of now) does not if HWA is enabled. See https://bugzilla.mozilla.org/show_bug.cgi?id=1606976
 * IE also doesn't. Chrome works, and everything seems to work on OSX and Android. This function caches the
 * result. I suppose that it is conceivably possible that a browser might flip modes while the app is
 * running, but lets hope not.
 *
 * @return {boolean} true if the Diagonal Rendering is broken.
 */
Determines if the current browser configuration can render triangular clip regions correctly.
This value is cached so the function is only expensive the first time called.
Firefox on Windows (as of now) does not if HWA is enabled.

@return {boolean} true if the Diagonal Rendering is broken.
Determines if the current browser configuration can render triangular clip regions correctly . This value is cached so the function is only expensive the first time called . Firefox on Windows ( as of now ) does not if HWA is enabled . @return { boolean } true if the Diagonal Rendering is broken .
function isBrokenDiagonalRendering() {
  if (brokenDiagonalRendering_ === undefined) {
    const ctx = document.createElement('canvas').getContext('2d');
    ctx.globalCompositeOperation = 'lighter';
    ctx.fillStyle = 'rgba(210, 0, 0, 0.75)';
    drawTestTriangle(ctx, 4, 5, 4, 0);
    drawTestTriangle(ctx, 4, 5, 0, 5);
    const data = ctx.getImageData(0, 0, 3, 3).data;
    brokenDiagonalRendering_ =
      verifyBrokenDiagonalRendering(data, 0) ||
      verifyBrokenDiagonalRendering(data, 4) ||
      verifyBrokenDiagonalRendering(data, 8);
  }
  return brokenDiagonalRendering_;
}
function isBrokenDiagonalRendering ( ) { if ( brokenDiagonalRendering_ === undefined ) { const ctx = document . createElement ( 'canvas' ) . getContext ( '2d' ) ; ctx . globalCompositeOperation = 'lighter' ; ctx . fillStyle = 'rgba(210, 0, 0, 0.75)' ; drawTestTriangle ( ctx , 4 , 5 , 4 , 0 ) ; drawTestTriangle ( ctx , 4 , 5 , 0 , 5 ) ; const data = ctx . getImageData ( 0 , 0 , 3 , 3 ) . data ; brokenDiagonalRendering_ = verifyBrokenDiagonalRendering ( data , 0 ) || verifyBrokenDiagonalRendering ( data , 4 ) || verifyBrokenDiagonalRendering ( data , 8 ) ; } return brokenDiagonalRendering_ ; }
Determines if the current browser configuration can render triangular clip regions correctly.
Determines if the current browser configuration can render triangular clip regions correctly .