Bug 111684 - [Cairo] NinePieceImage shows pixel cracks
Summary: [Cairo] NinePieceImage shows pixel cracks
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL: http://old.hempton.com/examples/scale...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-06 22:39 PST by younghwan cho
Modified: 2017-03-11 10:56 PST (History)
10 users (show)

See Also:


Attachments
screen-shot of this bug (106.06 KB, image/jpeg)
2013-03-06 22:39 PST, younghwan cho
no flags Details
proposal patch (1.95 KB, patch)
2013-03-06 23:02 PST, younghwan cho
no flags Details | Formatted Diff | Diff
proposed patch (2.73 KB, patch)
2013-03-06 23:31 PST, younghwan cho
no flags Details | Formatted Diff | Diff
patch (2.36 KB, patch)
2013-03-24 21:02 PDT, younghwan cho
no flags Details | Formatted Diff | Diff
patch (2.36 KB, patch)
2013-04-26 21:33 PDT, younghwan cho
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description younghwan cho 2013-03-06 22:39:33 PST
Created attachment 191922 [details]
screen-shot of this bug

(Linux. EFL using cairo)
in "http://old.hempton.com/examples/scale9grid/", you can see the border-image looks like cracked.

Screen-shot of MiniBrowser is attched.
Comment 1 younghwan cho 2013-03-06 23:02:31 PST
Created attachment 191924 [details]
proposal patch

for cairo, when it draws bitmap image, it has Antialiasing.
so when it's not aligned, it shows up like this bug.
when it doesn't need antialiasing, it has to draw with CAIRO_ANTIALIAS_NONE.
for skia, it's working like this. and I agree that.
I attached my proposal.
Comment 2 younghwan cho 2013-03-06 23:31:21 PST
Created attachment 191932 [details]
proposed patch

proposed patch.
No-Antialias for drawing bitmap like it does for skia.
Comment 3 Viatcheslav Ostapenko 2013-03-22 15:02:47 PDT
Comment on attachment 191932 [details]
proposed patch

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

> Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp:132
> +        cairo_antialias_t savedAntialiasRule = cairo_get_antialias(cr);

IMHO, context->save() already saves antialias state, so you don't need to save it here because there is context->restore() right after your change.
Comment 4 younghwan cho 2013-03-24 19:36:35 PDT
you're right. It's going to be more simple and nice.
modified patch will be.
Comment 5 younghwan cho 2013-03-24 21:02:11 PDT
Created attachment 194786 [details]
patch

modified patch
Comment 6 younghwan cho 2013-04-26 21:33:11 PDT
Created attachment 199889 [details]
patch

rebase patch