Bug 59965 - [chromium] Resizing a 2d canvas to huge dimensions after compositing crashes with accelerated 2d canvas option enabled
Summary: [chromium] Resizing a 2d canvas to huge dimensions after compositing crashes ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: James Robinson
URL:
Keywords:
: 60056 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-02 15:13 PDT by James Robinson
Modified: 2011-05-03 14:21 PDT (History)
7 users (show)

See Also:


Attachments
Patch (6.53 KB, patch)
2011-05-02 15:18 PDT, James Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Robinson 2011-05-02 15:13:13 PDT
[chromium] Resizing a 2d canvas to huge dimensions after compositing crashes with accelerated 2d canvas option enabled
Comment 1 James Robinson 2011-05-02 15:18:14 PDT
Created attachment 91991 [details]
Patch
Comment 2 James Robinson 2011-05-02 15:19:28 PDT
This crash is showing up with moderate frequency in recent Chrome releases.  It only shows up with the --enable-accelerated-2d-canvas flag on but can be triggered by doing something as simple as resizing the window with a fullscreen canvas demo opened.
Comment 3 Kenneth Russell 2011-05-02 19:37:54 PDT
Comment on attachment 91991 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=91991&action=review

> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:207
> +#endif

senorblanco should review this. He just added a short-circuit to DrawingBuffer::reset() to do no work if the size hasn't changed, and I have a feeling that making this contentChanged call in all cases may impact performance.
Comment 4 Stephen White 2011-05-03 12:56:53 PDT
Comment on attachment 91991 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=91991&action=review

Looks good (unofficially).

>> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:207
>> +#endif
> 
> senorblanco should review this. He just added a short-circuit to DrawingBuffer::reset() to do no work if the size hasn't changed, and I have a feeling that making this contentChanged call in all cases may impact performance.

I think this is correct.  Valid size changes are unaffected; this only changes the case when we're going from valid -> invalid size, in which case we won't be rendering Canvas2D on the GPU anyway and we should definitely tell the compositor.
Comment 5 Justin Novosad 2011-05-03 13:20:35 PDT
*** Bug 60056 has been marked as a duplicate of this bug. ***
Comment 6 Kenneth Russell 2011-05-03 14:03:06 PDT
Comment on attachment 91991 [details]
Patch

OK, sounds good.
Comment 7 James Robinson 2011-05-03 14:21:39 PDT
Comment on attachment 91991 [details]
Patch

Clearing flags on attachment: 91991

Committed r85661: <http://trac.webkit.org/changeset/85661>
Comment 8 James Robinson 2011-05-03 14:21:42 PDT
All reviewed patches have been landed.  Closing bug.