WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
98630
[CAIRO] Adjust the source rect size when IMAGE_DECODER_DOWN_SAMPLING is enabled
https://bugs.webkit.org/show_bug.cgi?id=98630
Summary
[CAIRO] Adjust the source rect size when IMAGE_DECODER_DOWN_SAMPLING is enabled
Jaehun Lim
Reported
2012-10-07 22:37:39 PDT
IMAGE_DECODER_DOWN_SAMPLING scales down the size of the big image. CAIRO needs to adjust the source size to the scaled value.
Attachments
Patch
(1.85 KB, patch)
2012-10-07 22:39 PDT
,
Jaehun Lim
mrobinson
: review+
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Testcase before patch
(2.33 MB, image/png)
2012-10-07 22:40 PDT
,
Jaehun Lim
no flags
Details
Testcase after patch
(2.67 MB, image/png)
2012-10-07 22:40 PDT
,
Jaehun Lim
no flags
Details
Fixed patch
(1.88 KB, patch)
2012-10-08 16:06 PDT
,
Jaehun Lim
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Jaehun Lim
Comment 1
2012-10-07 22:39:00 PDT
Created
attachment 167506
[details]
Patch
Jaehun Lim
Comment 2
2012-10-07 22:40:20 PDT
Created
attachment 167507
[details]
Testcase before patch
Jaehun Lim
Comment 3
2012-10-07 22:40:55 PDT
Created
attachment 167508
[details]
Testcase after patch
Martin Robinson
Comment 4
2012-10-08 11:46:20 PDT
Comment on
attachment 167506
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=167506&action=review
> Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp:109 > +#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING) > + cairo_surface_t* surface = nativeImage->surface(); > + IntSize scaledSize(cairo_image_surface_get_width(surface), cairo_image_surface_get_height(surface)); > + FloatRect adjustedSrcRect = adjustSourceRectForDownSampling(srcRect, scaledSize); > +#else > + FloatRect adjustedSrcRect(srcRect); > +#endif > + > + context->platformContext()->drawSurfaceToContext(nativeImage->surface(), dstRect, adjustedSrcRect, context);
Okay.
WebKit Review Bot
Comment 5
2012-10-08 11:50:40 PDT
Comment on
attachment 167506
[details]
Patch Rejecting
attachment 167506
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: ommit-queue/Source/WebKit/chromium/third_party/snappy/src --revision 63 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' 49>At revision 63. ________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' ________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' Updating webkit projects from gyp files... Full output:
http://queues.webkit.org/results/14223318
Jaehun Lim
Comment 6
2012-10-08 16:06:15 PDT
Created
attachment 167638
[details]
Fixed patch
noel gordon
Comment 7
2012-10-08 16:48:45 PDT
No tests. How come?
Martin Robinson
Comment 8
2012-10-08 16:51:15 PDT
(In reply to
comment #7
)
> No tests. How come?
Good question. As far as I know this isn't turned on yet.
Jaehun Lim
Comment 9
2012-10-08 17:51:22 PDT
Yes, we need test cases. But I think there are 2 problems. 1. IMAGE_DECODER_DOWN_SAMPLING is a compile-time option. And there are no ports to turn it on. So we need to re-compile to test it. 2. It scales down a big image file. So it's possible to make some troubles in existing test cases using image files. I think it's better to change IMAGE_DECODER_DOWN_SAMPLING as run-time option to turn it on/off dynamically, and then add some test cases.
WebKit Review Bot
Comment 10
2012-10-08 17:55:30 PDT
Comment on
attachment 167638
[details]
Fixed patch Clearing flags on attachment: 167638 Committed
r130706
: <
http://trac.webkit.org/changeset/130706
>
WebKit Review Bot
Comment 11
2012-10-08 17:55:34 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug