Bug 208899

Summary: [GPU Process] Work towards compiling out on non-Cocoa ports
Product: WebKit Reporter: Don Olmstead <don.olmstead>
Component: WebKit2Assignee: Don Olmstead <don.olmstead>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, commit-queue, darin, dino, eric.carlson, ews-watchlist, glenn, gyuyoung.kim, jer.noble, mmaxfield, philipj, ryuan.choi, sabouhallawa, sergio, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=208814
Bug Depends on:    
Bug Blocks: 206697    
Attachments:
Description Flags
WIP Patch
none
WIP Patch
none
Patch
none
Patch
darin: review+
Patch none

Description Don Olmstead 2020-03-10 17:34:45 PDT
Currently only Apple can compile.
Comment 1 Don Olmstead 2020-03-10 17:41:24 PDT Comment hidden (obsolete)
Comment 2 Don Olmstead 2020-03-10 17:47:19 PDT
Created attachment 393193 [details]
WIP Patch
Comment 3 Darin Adler 2020-03-10 18:05:25 PDT
Comment on attachment 393193 [details]
WIP Patch

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

> Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:39
> +#include <WebCore/GraphicsContext.h>

This should just be added to unconditional includes above, rather than putting it here in the #else.
Comment 4 Don Olmstead 2020-03-10 18:14:11 PDT
Comment on attachment 393193 [details]
WIP Patch

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

>> Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:39
>> +#include <WebCore/GraphicsContext.h>
> 
> This should just be added to unconditional includes above, rather than putting it here in the #else.

The GraphicsContextCG.h stuff was needed below. I actually had just WebCore/GraphicsContext.h in the previous patch but Apple builds failed.
Comment 5 Darin Adler 2020-03-10 18:21:33 PDT
Comment on attachment 393193 [details]
WIP Patch

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

> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:206
> +#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))

It would be nice to have a simpler #if here, but maybe this exactly matches how the player code is if-def’d.
Comment 6 Don Olmstead 2020-03-10 18:42:55 PDT Comment hidden (obsolete)
Comment 7 Don Olmstead 2020-03-10 18:46:42 PDT
Comment on attachment 393193 [details]
WIP Patch

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

>> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:206
>> +#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
> 
> It would be nice to have a simpler #if here, but maybe this exactly matches how the player code is if-def’d.

Yea it matches whats in that file.
Comment 8 Don Olmstead 2020-03-10 18:51:25 PDT
Created attachment 393200 [details]
Patch

Make style checker happy.

Should be good to go.
Comment 9 Konstantin Tokarev 2020-03-10 19:11:52 PDT
Aren't you clashing with work done in https://bugs.webkit.org/show_bug.cgi?id=208814 ?
Comment 10 Don Olmstead 2020-03-10 19:17:25 PDT
(In reply to Konstantin Tokarev from comment #9)
> Aren't you clashing with work done in
> https://bugs.webkit.org/show_bug.cgi?id=208814 ?

Sure but this compiles and is a bit simpler.
Comment 11 Darin Adler 2020-03-10 20:51:38 PDT
Comment on attachment 393200 [details]
Patch

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

> Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:39
> +#include <WebCore/GraphicsContext.h>

I still think this include should be unconditional in the paragraph above rather than having it inside an #else.
Comment 12 Don Olmstead 2020-03-10 21:39:43 PDT
Created attachment 393204 [details]
Patch

Patch for landing
Comment 13 WebKit Commit Bot 2020-03-10 22:44:54 PDT
Comment on attachment 393204 [details]
Patch

Clearing flags on attachment: 393204

Committed r258253: <https://trac.webkit.org/changeset/258253>
Comment 14 WebKit Commit Bot 2020-03-10 22:44:56 PDT
All reviewed patches have been landed.  Closing bug.
Comment 15 Radar WebKit Bug Importer 2020-03-10 22:45:13 PDT
<rdar://problem/60308681>