Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Starred by 4 users
Status: WontFix
Owner: ----
Closed: Feb 2014
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment
Canvas maximum size >32767px
Reported by voidvol...@gmail.com, Jan 31 2014 Back to list
Chrome Version       : 32.0.1700.76 (Официальная сборка 244343) m
URLs (if applicable) : http://jsbin.com/UguXuniF/3/edit?html,js,output
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
     Safari 6: N/A (some people say about 6100 px)
  Firefox 20: FAIL
       IE 7/8/9/10: FAIL (IE cut the picture)

What steps will reproduce the problem?
1. Set the size of canvas more 15bits width or length (>32767px)
2. Draw anything
3. Check result: white canvas

What is the expected result?

The colored picture.
According to W3 standarts:
http://www.w3.org/TR/html5/embedded-content-0.html#the-canvas-element

interface HTMLCanvasElement : HTMLElement {
           attribute unsigned long width;
           attribute unsigned long height;

Canvas can be any size from 0...4 294 967 295 px.

What happens instead?

 White list of canvas and lags, sometimes the page is crashed.

Please provide any additional information below. Attach a screenshot if
possible.

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<script type="text/javascript">
function test1(){
    var x = document.getElementById('board');
    x.height = 16383;
    x.width = 16383;
    var ctx = x.getContext('2d');
    ctx.fillStyle = 'royalblue';
    ctx.fillRect(0, 0, x.width, x.height);
    console.log( x.width +' x '+ x.height );
}

function test2(){
    var x = document.getElementById('board');
    x.height = 32768;
    x.width = 32768;
    var ctx = x.getContext('2d');
    ctx.fillStyle = 'orangered';
    ctx.fillRect(0, 0, x.width, x.height);
    console.log( x.width +' x '+ x.height );
}
</script>
</head>
<body>
  <button onclick="test1()">Test 1 royalblue 16383px</button>
  <button onclick="test2()">Test 2 orangered 32767px</button>
  <canvas id="board" width="300" height="300"/>
</body>
</html>
 
Comment 1 by tkent@chromium.org, Feb 3 2014
Labels: Cr-Internals-GPU-Canvas2D
Comment 2 by tkent@chromium.org, Feb 3 2014
Labels: Cr-Blink-Canvas
Cc: junov@chromium.org
Status: WontFix
IIRC, this is due to a limitation imposed by the Skia library used for graphics rendering in Chrome. It's unlikely to be fixed.
It's mean, I need to repost this bug to "Skia library" bug tracker? https://code.google.com/p/skia/ - here?
Feel free to so, but I wouldn't count on a quick fix. The limitations derive from some design choices in the raster antialiasing code in Skia, if I'm not mistaken.

(If you do file a Skia bug, feel free to provide a link back to this bug for reference.)
Link to Skia bug tracker: https://code.google.com/p/skia/issues/detail?id=2122
Sign in to add a comment