Bug 219487 - IPC should support non-byte aligned data references
Summary: IPC should support non-byte aligned data references
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kimmo Kinnunen
URL:
Keywords: InRadar
Depends on:
Blocks: webglgpup 217216
  Show dependency treegraph
 
Reported: 2020-12-03 03:49 PST by Kimmo Kinnunen
Modified: 2020-12-09 01:46 PST (History)
16 users (show)

See Also:


Attachments
Patch (84.49 KB, patch)
2020-12-03 04:49 PST, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (83.11 KB, patch)
2020-12-03 04:52 PST, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (82.51 KB, patch)
2020-12-08 22:46 PST, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (82.53 KB, patch)
2020-12-08 22:47 PST, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2020-12-03 03:49:41 PST
IPC should support non-byte aligned data references

This is needed to efficiently pass arrays of floats and ints in the WebGL GPU Process implementation
Comment 1 Kimmo Kinnunen 2020-12-03 04:49:36 PST
Created attachment 415293 [details]
Patch
Comment 2 Kimmo Kinnunen 2020-12-03 04:52:17 PST
Created attachment 415294 [details]
Patch
Comment 3 Peng Liu 2020-12-07 11:49:19 PST
Comment on attachment 415294 [details]
Patch

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

> Source/WebKit/Platform/IPC/ArrayReference.h:76
> +    size_t m_size { };

const T* m_data { nullptr };
size_t m_size { 0 };

> Source/WebKit/Platform/IPC/ArrayReference.h:117
> +    const T* m_data { };

const T* m_data { nullptr };
Comment 4 Chris Dumez 2020-12-08 12:12:41 PST
Comment on attachment 415294 [details]
Patch

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

r=me with nits.

> Source/WebKit/ChangeLog:10
> +        size is determined run-time.

*at* run-time

> Source/WebKit/ChangeLog:17
> +        DataReference or ArrayReference, as a synchronized call return value.

synchronized -> synchronous IPC

> Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.h:33
> +

I don't think we usually use a blank line in such cases.

> Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h:34
> +

ditto.

> Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h:34
> +

ditto.

> Source/WebKit/Platform/IPC/ArrayReference.h:2
> + * Copyright (C) 2010 Apple Inc. All rights reserved.

2010-2020

>> Source/WebKit/Platform/IPC/ArrayReference.h:76
>> +    size_t m_size { };
> 
> const T* m_data { nullptr };
> size_t m_size { 0 };

Agreed.

>> Source/WebKit/Platform/IPC/ArrayReference.h:117
>> +    const T* m_data { };
> 
> const T* m_data { nullptr };

Agreed.

> Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.cpp:43
> +    WebCore::Page* page = inspectorFrontend.frontendPage();

auto*
Comment 5 Kimmo Kinnunen 2020-12-08 22:46:11 PST
Created attachment 415717 [details]
Patch
Comment 6 Kimmo Kinnunen 2020-12-08 22:47:31 PST
Created attachment 415718 [details]
Patch
Comment 7 EWS 2020-12-08 23:51:46 PST
Committed r270573: <https://trac.webkit.org/changeset/270573>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 415718 [details].
Comment 8 Radar WebKit Bug Importer 2020-12-08 23:52:19 PST
<rdar://problem/72126664>
Comment 9 Ryosuke Niwa 2020-12-09 01:25:52 PST
This patch broke iOS builds (Apple internal builds).
Comment 10 Ryosuke Niwa 2020-12-09 01:44:15 PST
(In reply to Ryosuke Niwa from comment #9)
> This patch broke iOS builds (Apple internal builds).

Fixed in http://trac.webkit.org/r270576
Comment 11 Kimmo Kinnunen 2020-12-09 01:46:37 PST
Thanks, sorry!