<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>168654</bug_id>
          
          <creation_ts>2017-02-21 06:55:13 -0800</creation_ts>
          <short_desc>[Win] WebView is not painting in accelerated compositing mode.</short_desc>
          <delta_ts>2017-02-21 11:35:15 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=167830</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=64808</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Per Arne Vollan">pvollan</reporter>
          <assigned_to name="Per Arne Vollan">pvollan</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1279305</commentid>
    <comment_count>0</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-02-21 06:55:13 -0800</bug_when>
    <thetext>The WebView window is black in accelerated compositing mode.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279315</commentid>
    <comment_count>1</comment_count>
      <attachid>302257</attachid>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-02-21 07:19:55 -0800</bug_when>
    <thetext>Created attachment 302257
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279316</commentid>
    <comment_count>2</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-02-21 07:22:24 -0800</bug_when>
    <thetext>rdar://problem/30515072</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279384</commentid>
    <comment_count>3</comment_count>
      <attachid>302257</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-02-21 09:52:43 -0800</bug_when>
    <thetext>Comment on attachment 302257
Patch

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

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

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

&gt; Source/WebCore/ChangeLog:9
&gt; +        stops WevbView painting in accelerated mode.

WevbView. Why? Can you explain?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279391</commentid>
    <comment_count>4</comment_count>
      <attachid>302257</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2017-02-21 09:57:40 -0800</bug_when>
    <thetext>Comment on attachment 302257
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 &quot;FIXME&quot; comment here, and file a Bugzilla to find/fix the underlying issue? r=me with that change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279410</commentid>
    <comment_count>5</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-02-21 10:25:16 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Comment on attachment 302257 [details]
&gt; Patch
&gt;

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

When accelerated compositing mode is on, the web view doesn&apos;t paint anything.

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

It seems we have had a similar issue before:

https://bugs.webkit.org/show_bug.cgi?id=64808</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279418</commentid>
    <comment_count>6</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2017-02-21 10:38:44 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; &gt; &gt; Source/WebCore/ChangeLog:9
&gt; &gt; &gt; +        stops WevbView painting in accelerated mode.
&gt; &gt; 
&gt; &gt; WevbView. Why? Can you explain?
&gt; 
&gt; It seems we have had a similar issue before:
&gt; 
&gt; https://bugs.webkit.org/show_bug.cgi?id=64808

Gosh! We should really ask that Simon Fraser character what is going on here! ;-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279440</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-02-21 11:17:12 -0800</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279441</commentid>
    <comment_count>8</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-02-21 11:17:40 -0800</bug_when>
    <thetext>Also, did we not detect this failure because EWS doesn&apos;t run Windows tests, or something else?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279446</commentid>
    <comment_count>9</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-02-21 11:25:45 -0800</bug_when>
    <thetext>Committed &lt;https://trac.webkit.org/changeset/212730&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279448</commentid>
    <comment_count>10</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2017-02-21 11:26:37 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; Also, did we not detect this failure because EWS doesn&apos;t run Windows tests,
&gt; or something else?

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

Thanks! Yes, I will try this in https://bugs.webkit.org/show_bug.cgi?id=168666.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>302257</attachid>
            <date>2017-02-21 07:19:55 -0800</date>
            <delta_ts>2017-02-21 09:57:40 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-168654-20170221071709.patch</filename>
            <type>text/plain</type>
            <size>1338</size>
            <attacher name="Per Arne Vollan">pvollan</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDIxMjcxMikKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE3IEBACisyMDE3LTAyLTIxICBQZXIgQXJu
ZSBWb2xsYW4gIDxwdm9sbGFuQGFwcGxlLmNvbT4KKworICAgICAgICBbV2luXSBXZWJWaWV3IGlz
IG5vdCBwYWludGluZyBpbiBhY2NlbGVyYXRlZCBjb21wb3NpdGluZyBtb2RlLgorICAgICAgICBo
dHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTY4NjU0CisKKyAgICAgICAg
UmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgSW5pdGlhbGl6aW5nIHRoZSB1
bmNvbW1pdHRlZCBsYXllciBjaGFuZ2UgZmxhZ3MgdG8gQ292ZXJhZ2VSZWN0Q2hhbmdlZCBpbiBH
cmFwaGljc0xheWVyQ0EsCisgICAgICAgIHN0b3BzIFdldmJWaWV3IHBhaW50aW5nIGluIGFjY2Vs
ZXJhdGVkIG1vZGUuCisKKyAgICAgICAgQ292ZXJlZCBieSBleGlzdGluZyB0ZXN0cy4KKworICAg
ICAgICAqIHBsYXRmb3JtL2dyYXBoaWNzL2NhL0dyYXBoaWNzTGF5ZXJDQS5oOgorCiAyMDE3LTAy
LTIwICBNYXR0aGV3IEhhbnNvbiAgPG1hdHRoZXdfaGFuc29uQGFwcGxlLmNvbT4KIAogICAgICAg
ICBSb2xsb3V0IHIyMTI2MDEuIHJkYXI6Ly9wcm9ibGVtLzMwMzM5NjM4CkluZGV4OiBTb3VyY2Uv
V2ViQ29yZS9wbGF0Zm9ybS9ncmFwaGljcy9jYS9HcmFwaGljc0xheWVyQ0EuaAo9PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
Ci0tLSBTb3VyY2UvV2ViQ29yZS9wbGF0Zm9ybS9ncmFwaGljcy9jYS9HcmFwaGljc0xheWVyQ0Eu
aAkocmV2aXNpb24gMjEyNjM1KQorKysgU291cmNlL1dlYkNvcmUvcGxhdGZvcm0vZ3JhcGhpY3Mv
Y2EvR3JhcGhpY3NMYXllckNBLmgJKHdvcmtpbmcgY29weSkKQEAgLTU4Nyw3ICs1ODcsMTIgQEAg
cHJpdmF0ZToKIAogICAgIEZsb2F0U2l6ZSBtX3BpeGVsQWxpZ25tZW50T2Zmc2V0OwogCisjaWYg
UExBVEZPUk0oV0lOKQorICAgIExheWVyQ2hhbmdlRmxhZ3MgbV91bmNvbW1pdHRlZENoYW5nZXMg
eyAwIH07CisjZWxzZQogICAgIExheWVyQ2hhbmdlRmxhZ3MgbV91bmNvbW1pdHRlZENoYW5nZXMg
eyBDb3ZlcmFnZVJlY3RDaGFuZ2VkIH07CisjZW5kaWYKKwogICAgIGJvb2wgbV9pc0NvbW1pdHRp
bmdDaGFuZ2VzIHsgZmFsc2UgfTsKIH07CiAK
</data>
<flag name="review"
          id="323975"
          type_id="1"
          status="+"
          setter="bfulgham"
    />
    <flag name="commit-queue"
          id="323996"
          type_id="3"
          status="-"
          setter="bfulgham"
    />
          </attachment>
      

    </bug>

</bugzilla>