Bug 168654 - [Win] WebView is not painting in accelerated compositing mode.
Summary: [Win] WebView is not painting in accelerated compositing mode.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-02-21 06:55 PST by Per Arne Vollan
Modified: 2017-02-21 11:35 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.31 KB, patch)
2017-02-21 07:19 PST, Per Arne Vollan
bfulgham: review+
bfulgham: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2017-02-21 06:55:13 PST
The WebView window is black in accelerated compositing mode.
Comment 1 Per Arne Vollan 2017-02-21 07:19:55 PST
Created attachment 302257 [details]
Patch
Comment 2 Per Arne Vollan 2017-02-21 07:22:24 PST
rdar://problem/30515072
Comment 3 Simon Fraser (smfr) 2017-02-21 09:52:43 PST
Comment on attachment 302257 [details]
Patch

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

> Source/WebCore/ChangeLog:3
> +        [Win] WebView is not painting in accelerated compositing mode.

Does this mean "When the web view paints, it is not making use of accelerated compositing", or "When accelerated compositing mode is on, the web view doesn't paint anything"?

> Source/WebCore/ChangeLog:9
> +        stops WevbView painting in accelerated mode.

WevbView. Why? Can you explain?
Comment 4 Brent Fulgham 2017-02-21 09:57:40 PST
Comment on attachment 302257 [details]
Patch

I think this is okay as a short-term fix, but we need to understand why this change broke Windows so badly. Can you please add a "FIXME" comment here, and file a Bugzilla to find/fix the underlying issue? r=me with that change.
Comment 5 Per Arne Vollan 2017-02-21 10:25:16 PST
(In reply to comment #3)
> Comment on attachment 302257 [details]
> Patch
>

Thanks for reviewing!
 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=302257&action=review
> 
> > Source/WebCore/ChangeLog:3
> > +        [Win] WebView is not painting in accelerated compositing mode.
> 
> Does this mean "When the web view paints, it is not making use of
> accelerated compositing", or "When accelerated compositing mode is on, the
> web view doesn't paint anything"?
> 

When accelerated compositing mode is on, the web view doesn't paint anything.

> > Source/WebCore/ChangeLog:9
> > +        stops WevbView painting in accelerated mode.
> 
> WevbView. Why? Can you explain?

It seems we have had a similar issue before:

https://bugs.webkit.org/show_bug.cgi?id=64808
Comment 6 Brent Fulgham 2017-02-21 10:38:44 PST
(In reply to comment #5)
> > > Source/WebCore/ChangeLog:9
> > > +        stops WevbView painting in accelerated mode.
> > 
> > WevbView. Why? Can you explain?
> 
> It seems we have had a similar issue before:
> 
> https://bugs.webkit.org/show_bug.cgi?id=64808

Gosh! We should really ask that Simon Fraser character what is going on here! ;-)
Comment 7 Simon Fraser (smfr) 2017-02-21 11:17:12 PST
So maybe the right fix is:

diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
index e7f3b879c0b1c3ce2317fff2296f24c6071ccb0c..6a3969ccc2627eeffad2ebff6c1b9e741bd51399 100644
--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
@@ -408,6 +408,7 @@ void GraphicsLayerCA::initialize(Type layerType)
     }
     m_layer = createPlatformCALayer(platformLayerType, this);
     noteLayerPropertyChanged(ContentsScaleChanged);
+    noteLayerPropertyChanged(CoverageRectChanged);
 }
 
 GraphicsLayerCA::~GraphicsLayerCA()
diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
index 07b6afaad4fe2ae568e7faedb62fda0e73364e19..72da30fa9ca24ab6fccfaafe0d79a56bc4c058fa 100644
--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
@@ -586,7 +586,7 @@ private:
 
     FloatSize m_pixelAlignmentOffset;
 
-    LayerChangeFlags m_uncommittedChanges { CoverageRectChanged };
+    LayerChangeFlags m_uncommittedChanges { 0 };
     bool m_isCommittingChanges { false };
 };
 
Can you try that?
Comment 8 Simon Fraser (smfr) 2017-02-21 11:17:40 PST
Also, did we not detect this failure because EWS doesn't run Windows tests, or something else?
Comment 9 Per Arne Vollan 2017-02-21 11:25:45 PST
Committed <https://trac.webkit.org/changeset/212730>
Comment 10 Per Arne Vollan 2017-02-21 11:26:37 PST
(In reply to comment #8)
> Also, did we not detect this failure because EWS doesn't run Windows tests,
> or something else?

Yes, we hope to get EWS running on Windows soon :)
Comment 11 Per Arne Vollan 2017-02-21 11:35:15 PST
(In reply to comment #7)
> So maybe the right fix is:
> 
> diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
> b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
> index
> e7f3b879c0b1c3ce2317fff2296f24c6071ccb0c..
> 6a3969ccc2627eeffad2ebff6c1b9e741bd51399 100644
> --- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
> +++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
> @@ -408,6 +408,7 @@ void GraphicsLayerCA::initialize(Type layerType)
>      }
>      m_layer = createPlatformCALayer(platformLayerType, this);
>      noteLayerPropertyChanged(ContentsScaleChanged);
> +    noteLayerPropertyChanged(CoverageRectChanged);
>  }
>  
>  GraphicsLayerCA::~GraphicsLayerCA()
> diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
> b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
> index
> 07b6afaad4fe2ae568e7faedb62fda0e73364e19..
> 72da30fa9ca24ab6fccfaafe0d79a56bc4c058fa 100644
> --- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
> +++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
> @@ -586,7 +586,7 @@ private:
>  
>      FloatSize m_pixelAlignmentOffset;
>  
> -    LayerChangeFlags m_uncommittedChanges { CoverageRectChanged };
> +    LayerChangeFlags m_uncommittedChanges { 0 };
>      bool m_isCommittingChanges { false };
>  };
>  
> Can you try that?

Thanks! Yes, I will try this in https://bugs.webkit.org/show_bug.cgi?id=168666.