Bug 219487

Summary: IPC should support non-byte aligned data references
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: WebKit2Assignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, cdumez, eric.carlson, ews-watchlist, glenn, hi, jer.noble, jiewen_tan, joepeck, peng.liu6, philipj, rniwa, sam, sergio, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 217211, 217216    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

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!