Bug 169651 - Make a base class for WebGL and WebGPU contexts
Summary: Make a base class for WebGL and WebGPU contexts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-03-14 18:25 PDT by Dean Jackson
Modified: 2017-03-15 15:58 PDT (History)
1 user (show)

See Also:


Attachments
Patch (19.88 KB, patch)
2017-03-14 18:32 PDT, Dean Jackson
simon.fraser: review+
Details | Formatted Diff | Diff
Patch (18.92 KB, patch)
2017-03-15 11:30 PDT, Dean Jackson
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews122 for ios-simulator-wk2 (707.13 KB, application/zip)
2017-03-15 13:21 PDT, Build Bot
no flags Details
Patch (18.92 KB, patch)
2017-03-15 13:27 PDT, Dean Jackson
buildbot: commit-queue-
Details | Formatted Diff | Diff
Patch (19.32 KB, patch)
2017-03-15 14:17 PDT, Dean Jackson
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews122 for ios-simulator-wk2 (798.67 KB, application/zip)
2017-03-15 14:58 PDT, Build Bot
no flags Details
Patch (19.13 KB, patch)
2017-03-15 15:16 PDT, Dean Jackson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2017-03-14 18:25:32 PDT
Make a base class for WebGL and WebGPU contexts
Comment 1 Dean Jackson 2017-03-14 18:26:26 PDT
<rdar://problem/31053489>
Comment 2 Dean Jackson 2017-03-14 18:32:03 PDT
Created attachment 304460 [details]
Patch
Comment 3 Simon Fraser (smfr) 2017-03-14 19:09:46 PDT
Comment on attachment 304460 [details]
Patch

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

> Source/WebCore/html/HTMLCanvasElement.cpp:397
> +        static_cast<GPUBasedCanvasRenderingContext*>(m_context.get())->reshape(width(), height());

This should be downcast<>.

> Source/WebCore/html/HTMLCanvasElement.cpp:463
> +        static_cast<GPUBasedCanvasRenderingContext*>(m_context.get())->markLayerComposited();

downcast<>

> Source/WebCore/html/canvas/GPUBasedCanvasRenderingContext.h:48
> +    virtual void reshape(int width, int height) = 0;

Maybe IntSize eventually.

> Source/WebCore/html/canvas/WebGLRenderingContextBase.h:342
> +    void reshape(int width, int height) override;

final?

> Source/WebCore/html/canvas/WebGLRenderingContextBase.h:344
> +    void markLayerComposited() override;

final?

> Source/WebCore/html/canvas/WebGPURenderingContext.h:52
> +    bool isWebGPU() const override { return true; }

final?

> Source/WebCore/html/canvas/WebGPURenderingContext.h:54
> +    void reshape(int width, int height) override;

final?
Comment 4 Dean Jackson 2017-03-15 02:43:43 PDT
Committed r213977: <http://trac.webkit.org/changeset/213977>
Comment 5 Ryan Haddad 2017-03-15 09:04:12 PDT
(In reply to comment #4)
> Committed r213977: <http://trac.webkit.org/changeset/213977>

This change broke the Windows build:
https://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/84817
Comment 6 Ryan Haddad 2017-03-15 10:07:02 PDT
Reverted r213977 for reason:

This change broke the Windows build.

Committed r213985: <http://trac.webkit.org/changeset/213985>
Comment 7 Dean Jackson 2017-03-15 11:30:44 PDT
Created attachment 304519 [details]
Patch
Comment 8 Build Bot 2017-03-15 13:21:44 PDT
Comment on attachment 304519 [details]
Patch

Attachment 304519 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/3332104

New failing tests:
imported/w3c/web-platform-tests/IndexedDB/fire-success-event-exception.html
Comment 9 Build Bot 2017-03-15 13:21:46 PDT
Created attachment 304535 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 10 Dean Jackson 2017-03-15 13:27:16 PDT
Created attachment 304536 [details]
Patch
Comment 11 Dean Jackson 2017-03-15 14:17:05 PDT
Created attachment 304545 [details]
Patch
Comment 12 Build Bot 2017-03-15 14:58:29 PDT
Comment on attachment 304536 [details]
Patch

Attachment 304536 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/3332592

New failing tests:
imported/w3c/web-platform-tests/IndexedDB/fire-success-event-exception.html
Comment 13 Build Bot 2017-03-15 14:58:39 PDT
Created attachment 304554 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 14 Dean Jackson 2017-03-15 15:16:53 PDT
Created attachment 304557 [details]
Patch
Comment 15 Dean Jackson 2017-03-15 15:22:26 PDT
It helps if you upload the correct patch. #protip
Comment 16 Dean Jackson 2017-03-15 15:58:47 PDT
Committed r214017: <http://trac.webkit.org/changeset/214017>