Bug 150066

Summary: Add basic canvas tests
Product: WebKit Reporter: Jon Lee <jonlee>
Component: AnimationsAssignee: Jon Lee <jonlee>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, rniwa, sabouhallawa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 149053    
Attachments:
Description Flags
Patch dino: review+

Description Jon Lee 2015-10-12 17:22:20 PDT
Add basic canvas tests
Comment 1 Radar WebKit Bug Importer 2015-10-12 17:22:38 PDT
<rdar://problem/23081143>
Comment 2 Jon Lee 2015-10-12 17:38:53 PDT
Created attachment 262945 [details]
Patch
Comment 3 Said Abou-Hallawa 2015-10-12 17:48:46 PDT
Comment on attachment 262945 [details]
Patch

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

> PerformanceTests/Animometer/tests/simple/resources/simple-canvas-paths.js:5
> +    var toCenter = stage.randomPosition(stage.size).subtract(new Point(maxSize/2, maxSize/2));

You can use maxSize.center() instead of new Point(maxSize/2, maxSize/2).
Comment 4 Jon Lee 2015-10-12 17:51:56 PDT
Comment on attachment 262945 [details]
Patch

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

>> PerformanceTests/Animometer/tests/simple/resources/simple-canvas-paths.js:5
>> +    var toCenter = stage.randomPosition(stage.size).subtract(new Point(maxSize/2, maxSize/2));
> 
> You can use maxSize.center() instead of new Point(maxSize/2, maxSize/2).

maxSize is an int though...
Comment 5 Said Abou-Hallawa 2015-10-12 17:57:01 PDT
Comment on attachment 262945 [details]
Patch

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

>>> PerformanceTests/Animometer/tests/simple/resources/simple-canvas-paths.js:5
>>> +    var toCenter = stage.randomPosition(stage.size).subtract(new Point(maxSize/2, maxSize/2));
>> 
>> You can use maxSize.center() instead of new Point(maxSize/2, maxSize/2).
> 
> maxSize is an int though...

Never mind. I thought maxSize is a rectangle of max width and max height and not a side in a square side.
Comment 6 Dean Jackson 2015-10-12 18:05:31 PDT
Comment on attachment 262945 [details]
Patch

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

> PerformanceTests/Animometer/tests/simple/resources/simple-canvas.js:51
> +}
> +
> +
> +function SimpleCanvasBenchmark(suite, test, options, recordTable, progressBar) {

Nit: extra blank line
Comment 7 Jon Lee 2015-10-12 18:12:56 PDT
Committed r190912: <http://trac.webkit.org/changeset/190912>