Bug 172502 - REGRESSION(r216901): ImageDecoders: rendering of large images is broken since r216901
Summary: REGRESSION(r216901): ImageDecoders: rendering of large images is broken since...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Miguel Gomez
URL:
Keywords:
: 173360 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-23 08:37 PDT by ManDay
Modified: 2017-06-16 02:48 PDT (History)
9 users (show)

See Also:


Attachments
Screenshot of broken rendering (1.31 MB, image/png)
2017-05-23 08:39 PDT, ManDay
no flags Details
Patch (4.97 KB, patch)
2017-06-13 09:35 PDT, Miguel Gomez
no flags Details | Formatted Diff | Diff
Patch (5.00 KB, patch)
2017-06-14 02:17 PDT, Miguel Gomez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ManDay 2017-05-23 08:37:54 PDT
As of 2.17.3, about 10% of the pictures on a website are typically broken in a way that looks like a broke decoding or memory violations. One example is attached. Other examples are pictures being interchanged, pictures being mixed together, or random behaviour during redraw (scrolling). I suspect a screenshot alone doesn't help much pinpointing the cause but for now I can not bisect the issue. What might be worth mentioning:

Mesa from GIT @ 17.1-branchpoint-1052-g1586768e7
Weston from GIT @ 2.0.0-73-geca5cca5
Happens also under other compositors, all pure Wayland
Configured with -DPORT=GTK -DUSE_LD_GOLD=OFF -DUSE_LIBSECRET=OFF -DENABLE_GEOLOCATION=OFF -DENABLE_INTROSPECTION=OFF -DENABLE_MINIBROWSER=ON -DCMAKE_INSTALL_PREFIX=/home/manday/local/ -DCMAKE_BUILD_TYPE=Release -DENABLE_SPELLCHECK=OFF -DUSE_LIBNOTIFY=OFF -DUSE_LIBHYPHEN=OFF
Comment 1 ManDay 2017-05-23 08:39:18 PDT
Created attachment 311014 [details]
Screenshot of broken rendering
Comment 2 Michael Catanzaro 2017-05-23 08:45:49 PDT
Looks like an image decoders problem, and maybe a separate scrolling bug.
Comment 3 Miguel Gomez 2017-06-13 09:35:47 PDT
Created attachment 312779 [details]
Patch
Comment 4 Build Bot 2017-06-13 09:37:51 PDT
Attachment 312779 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:40:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Alex Christensen 2017-06-13 09:49:03 PDT
Comment on attachment 312779 [details]
Patch

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

> Source/WebCore/platform/graphics/ImageBackingStore.h:218
>      RGBA32* m_pixelsPtr { nullptr };

Could you make this a const RGBA32* to not need to add two const_casts?
Comment 6 Carlos Garcia Campos 2017-06-13 11:01:42 PDT
Let's give this a better title before landing this. I think this regressed in r216901.
Comment 7 Carlos Garcia Campos 2017-06-13 11:04:36 PDT
Comment on attachment 312779 [details]
Patch

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

This looks good to me, please, check if you can use a const RGBA32* as Alex suggested before landing.

> Source/WebCore/ChangeLog:3
> +        Rendering (accelerated?) badly broken in 2.17.3

Please, update the bug title before landing.
Comment 8 Miguel Gomez 2017-06-14 01:59:37 PDT
(In reply to Alex Christensen from comment #5)
> Comment on attachment 312779 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=312779&action=review
> 
> > Source/WebCore/platform/graphics/ImageBackingStore.h:218
> >      RGBA32* m_pixelsPtr { nullptr };
> 
> Could you make this a const RGBA32* to not need to add two const_casts?

There are places in the code where the content of m_pixelsPtr is being changed, so I don't think making it const is an option :(
Comment 9 Miguel Gomez 2017-06-14 02:17:09 PDT
Created attachment 312876 [details]
Patch
Comment 10 Build Bot 2017-06-14 02:39:38 PDT
Attachment 312876 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:40:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Carlos Garcia Campos 2017-06-14 03:52:32 PDT
*** Bug 173360 has been marked as a duplicate of this bug. ***
Comment 12 WebKit Commit Bot 2017-06-14 04:23:28 PDT
Comment on attachment 312876 [details]
Patch

Clearing flags on attachment: 312876

Committed r218253: <http://trac.webkit.org/changeset/218253>
Comment 13 WebKit Commit Bot 2017-06-14 04:23:30 PDT
All reviewed patches have been landed.  Closing bug.