Bug 183663 - REGRESSION(r229484): Plugins often require CGS Connections to draw
Summary: REGRESSION(r229484): Plugins often require CGS Connections to draw
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on: 182747
Blocks: 183672
  Show dependency treegraph
 
Reported: 2018-03-15 09:57 PDT by Brent Fulgham
Modified: 2018-03-15 12:40 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.36 KB, patch)
2018-03-15 10:04 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2018-03-15 09:57:54 PDT
Flash content broke after r229484 because it needs an active CGSConnection to perform certain drawing operations. To maintain compatibility, we need to continue to allow the Plugin Process to communicate with the Window Server, which is unfortunate.
Comment 1 Brent Fulgham 2018-03-15 09:58:24 PDT
<rdar://problem/38439218>
Comment 2 Brent Fulgham 2018-03-15 10:04:50 PDT
Created attachment 335857 [details]
Patch
Comment 3 Per Arne Vollan 2018-03-15 10:11:51 PDT
Comment on attachment 335857 [details]
Patch

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

> Source/WebKit/Platform/mac/LayerHostingContext.mm:81
> +    layerHostingContext->m_context = [CAContext contextWithCGSConnection:CGSMainConnectionID() options:@{ kCAContextCIFilterBehavior : @"ignore" }];

Will creating the context with 'layerHostingContext->m_context = [CAContext remoteContextWithOptions:@{kCAContextCIFilterBehavior :  @"ignore"}];' work?
Comment 4 Brent Fulgham 2018-03-15 10:12:51 PDT
(In reply to Per Arne Vollan from comment #3)
> Comment on attachment 335857 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=335857&action=review
> 
> > Source/WebKit/Platform/mac/LayerHostingContext.mm:81
> > +    layerHostingContext->m_context = [CAContext contextWithCGSConnection:CGSMainConnectionID() options:@{ kCAContextCIFilterBehavior : @"ignore" }];
> 
> Will creating the context with 'layerHostingContext->m_context = [CAContext
> remoteContextWithOptions:@{kCAContextCIFilterBehavior :  @"ignore"}];' work?

No -- I tried that first and it failed.
Comment 5 Per Arne Vollan 2018-03-15 10:20:07 PDT
Comment on attachment 335857 [details]
Patch

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

R=me.

>>> Source/WebKit/Platform/mac/LayerHostingContext.mm:81
>>> +    layerHostingContext->m_context = [CAContext contextWithCGSConnection:CGSMainConnectionID() options:@{ kCAContextCIFilterBehavior : @"ignore" }];
>> 
>> Will creating the context with 'layerHostingContext->m_context = [CAContext remoteContextWithOptions:@{kCAContextCIFilterBehavior :  @"ignore"}];' work?
> 
> No -- I tried that first and it failed.

Ah, right. I first thought it was the call '[CAContext setAllowsCGSConnections:NO];' that made this fail for the Plugin process.
Comment 6 WebKit Commit Bot 2018-03-15 11:30:24 PDT
Comment on attachment 335857 [details]
Patch

Clearing flags on attachment: 335857

Committed r229629: <https://trac.webkit.org/changeset/229629>
Comment 7 WebKit Commit Bot 2018-03-15 11:30:25 PDT
All reviewed patches have been landed.  Closing bug.