Bug 58497 - Implement drawingBufferWidth/drawingBufferHeight in WebGL
Summary: Implement drawingBufferWidth/drawingBufferHeight in WebGL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Zhenyao Mo
URL:
Keywords:
Depends on:
Blocks: 63102 63101
  Show dependency treegraph
 
Reported: 2011-04-13 17:12 PDT by Zhenyao Mo
Modified: 2011-06-21 16:47 PDT (History)
5 users (show)

See Also:


Attachments
Patch (11.03 KB, patch)
2011-06-21 12:11 PDT, Zhenyao Mo
no flags Details | Formatted Diff | Diff
Patch (18.69 KB, patch)
2011-06-21 15:59 PDT, Zhenyao Mo
kbr: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ec2-cr-linux-03 (1.26 MB, application/zip)
2011-06-21 16:20 PDT, WebKit Review Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zhenyao Mo 2011-04-13 17:12:33 PDT
See WebGL spec 1.0 section 2.2.
Comment 1 Zhenyao Mo 2011-06-21 12:11:16 PDT
Created attachment 98036 [details]
Patch
Comment 2 Zhenyao Mo 2011-06-21 15:59:59 PDT
Created attachment 98072 [details]
Patch
Comment 3 Zhenyao Mo 2011-06-21 16:09:05 PDT
Note that this patch doesn't deal with compositing.  I created two new bugs to track the compositing issues for chromium (63101) and safari (63102).  I am working on the chromium port one.
Comment 4 Kenneth Russell 2011-06-21 16:20:40 PDT
Comment on attachment 98072 [details]
Patch

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

Looks good overall. One comment, and please make sure any relevant tests are synchronized with the WebGL conformance suite.

> Source/WebCore/html/canvas/WebGLRenderingContext.cpp:608
> +    if (width > maxWidth)
> +        width = maxWidth;
> +    if (width <= 0)
> +        width = 1;

How about a "clamp" helper function? (Too bad the STL doesn't contain one...)
Comment 5 WebKit Review Bot 2011-06-21 16:20:53 PDT
Comment on attachment 98072 [details]
Patch

Attachment 98072 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/8919144

New failing tests:
fast/canvas/webgl/drawingbuffer-test.html
Comment 6 WebKit Review Bot 2011-06-21 16:20:59 PDT
Created attachment 98075 [details]
Archive of layout-test-results from ec2-cr-linux-03

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-03  Port: Chromium  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 7 Zhenyao Mo 2011-06-21 16:31:16 PDT
(In reply to comment #4)
> (From update of attachment 98072 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=98072&action=review
> 
> Looks good overall. One comment, and please make sure any relevant tests are synchronized with the WebGL conformance suite.

Yes tests are synced with khronos.

> 
> > Source/WebCore/html/canvas/WebGLRenderingContext.cpp:608
> > +    if (width > maxWidth)
> > +        width = maxWidth;
> > +    if (width <= 0)
> > +        width = 1;
> 
> How about a "clamp" helper function? (Too bad the STL doesn't contain one...)

Will do in the landing patch.
Comment 8 Zhenyao Mo 2011-06-21 16:47:10 PDT
Committed r89393: <http://trac.webkit.org/changeset/89393>