Title: [214241] trunk/Source/WebCore
Revision
214241
Author
simon.fra...@apple.com
Date
2017-03-21 20:49:50 -0700 (Tue, 21 Mar 2017)

Log Message

Make non-decoded image flashing less intrusive
https://bugs.webkit.org/show_bug.cgi?id=169942

Reviewed by Said Abou-Hallawa.

When compositing borders are enabled, we paint yellow for images that paint but don't yet have a decoded
frame. Give this yellow 50% alpha to make it less intrusive

Also log to the images log channel when we destroy decoded data.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedData):
(WebCore::BitmapImage::draw):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (214240 => 214241)


--- trunk/Source/WebCore/ChangeLog	2017-03-22 01:55:00 UTC (rev 214240)
+++ trunk/Source/WebCore/ChangeLog	2017-03-22 03:49:50 UTC (rev 214241)
@@ -1,3 +1,19 @@
+2017-03-21  Simon Fraser  <simon.fra...@apple.com>
+
+        Make non-decoded image flashing less intrusive
+        https://bugs.webkit.org/show_bug.cgi?id=169942
+
+        Reviewed by Said Abou-Hallawa.
+
+        When compositing borders are enabled, we paint yellow for images that paint but don't yet have a decoded
+        frame. Give this yellow 50% alpha to make it less intrusive
+
+        Also log to the images log channel when we destroy decoded data.
+
+        * platform/graphics/BitmapImage.cpp:
+        (WebCore::BitmapImage::destroyDecodedData):
+        (WebCore::BitmapImage::draw):
+
 2017-03-20  Matt Rajca  <mra...@apple.com>
 
         Loosen audio playback restrictions when the volume is 0.

Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (214240 => 214241)


--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2017-03-22 01:55:00 UTC (rev 214240)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2017-03-22 03:49:50 UTC (rev 214241)
@@ -65,6 +65,8 @@
 
 void BitmapImage::destroyDecodedData(bool destroyAll)
 {
+    LOG(Images, "BitmapImage::%s - %p - url: %s", __FUNCTION__, this, sourceURL().utf8().data());
+
     if (!destroyAll)
         m_source.destroyDecodedDataBeforeFrame(m_currentFrame);
     else if (m_source.hasAsyncDecodingQueue())
@@ -169,7 +171,7 @@
 
     StartAnimationResult result = internalStartAnimation();
     if (result == StartAnimationResult::DecodingActive && showDebugBackground()) {
-        fillWithSolidColor(context, destRect, Color::yellow, op);
+        fillWithSolidColor(context, destRect, Color(Color::yellow).colorWithAlpha(0.5), op);
         return;
     }
 
@@ -188,7 +190,7 @@
 
             if (!frameHasDecodedNativeImage(m_currentFrame)) {
                 if (showDebugBackground())
-                    fillWithSolidColor(context, destRect, Color::yellow, op);
+                    fillWithSolidColor(context, destRect, Color(Color::yellow).colorWithAlpha(0.5), op);
                 return;
             }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to