WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
39085
Resized Images are not cached in Chromium (Skia)
https://bugs.webkit.org/show_bug.cgi?id=39085
Summary
Resized Images are not cached in Chromium (Skia)
Sergey Ulanov
Reported
2010-05-13 13:40:22 PDT
Skia version of Image::drawPattern() resizes images using bicubic scaling and doesn't cache results. This causes very poor performance when playing HTML5 video on YouTube when zoom factor is different from 1.0. Problem is that the video controls are refreshed after each frame and this requires resizing background image for the controls.
Attachments
Fix for this bug.
(1.73 KB, patch)
2010-05-13 14:30 PDT
,
Sergey Ulanov
no flags
Details
Formatted Diff
Diff
Fix for this bug.
(1.73 KB, patch)
2010-05-13 17:19 PDT
,
Sergey Ulanov
dimich
: review-
Details
Formatted Diff
Diff
Patch, addressed review comments.
(2.27 KB, patch)
2010-05-13 20:41 PDT
,
Sergey Ulanov
no flags
Details
Formatted Diff
Diff
Patch.
(2.28 KB, patch)
2010-05-13 20:43 PDT
,
Sergey Ulanov
no flags
Details
Formatted Diff
Diff
Patch
(2.33 KB, patch)
2010-05-13 20:48 PDT
,
Sergey Ulanov
no flags
Details
Formatted Diff
Diff
Patch.
(2.09 KB, patch)
2010-05-13 21:30 PDT
,
Sergey Ulanov
dimich
: review+
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Sergey Ulanov
Comment 1
2010-05-13 14:30:28 PDT
Created
attachment 56025
[details]
Fix for this bug.
WebKit Review Bot
Comment 2
2010-05-13 14:32:05 PDT
Attachment 56025
[details]
did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 WebCore/platform/graphics/skia/ImageSkia.cpp:350: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4] WebCore/platform/graphics/skia/ImageSkia.cpp:350: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] WebCore/platform/graphics/skia/ImageSkia.cpp:351: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4] WebCore/platform/graphics/skia/ImageSkia.cpp:352: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4] Total errors found: 4 in 1 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sergey Ulanov
Comment 3
2010-05-13 17:19:54 PDT
Created
attachment 56035
[details]
Fix for this bug.
Brett Wilson (Google)
Comment 4
2010-05-13 18:30:23 PDT
This patch looks good to me (note that I'm not a real WebKit reviewer).
Dmitry Titov
Comment 5
2010-05-13 19:32:06 PDT
Comment on
attachment 56035
[details]
Fix for this bug. I can't check the functional validity. If Brett thinks it's ok and layout tests with pixel compare don't fail it could be ok. Some style issues: The change needs a ChangeLog (hence r-)
> + || bitmap->shouldCacheResampling(static_cast<int>(destBitmapWidth), static_cast<int>(destBitmapHeight), > + static_cast<int>(destBitmapWidth), static_cast<int>(destBitmapHeight))) ) {
I don't think the space before the closing ')' is needed. Could I suggest all those casts to be moved to the top, initializing some local 'destWidth' and 'destHeight', so we don't have a dozen of them repeated everywhere?
> + // resize() caches resized images. > + resampled = bitmap->resizedBitmap(static_cast<int>(destBitmapWidth), > + static_cast<int>(destBitmapHeight));
Once the casts are gone, this line can be un-wrapped.
Sergey Ulanov
Comment 6
2010-05-13 20:41:02 PDT
Created
attachment 56052
[details]
Patch, addressed review comments.
Sergey Ulanov
Comment 7
2010-05-13 20:43:16 PDT
Created
attachment 56053
[details]
Patch.
Sergey Ulanov
Comment 8
2010-05-13 20:48:40 PDT
Created
attachment 56054
[details]
Patch Added link to the bug in the ChangeLog.
Sergey Ulanov
Comment 9
2010-05-13 21:30:57 PDT
Created
attachment 56055
[details]
Patch.
Dmitry Titov
Comment 10
2010-05-13 21:32:59 PDT
Comment on
attachment 56055
[details]
Patch. r=me
Dmitry Titov
Comment 11
2010-05-14 13:20:15 PDT
Comment on
attachment 56055
[details]
Patch. Going to land this manually for Sergey. removing cq+.
Dmitry Titov
Comment 12
2010-05-14 13:37:03 PDT
Landed:
http://trac.webkit.org/changeset/59487
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