Bug 94241 - Frame bytes should be determined by platform image decoder
Summary: Frame bytes should be determined by platform image decoder
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hin-Chung Lam
URL:
Keywords:
Depends on:
Blocks: 94240
  Show dependency treegraph
 
Reported: 2012-08-16 12:56 PDT by Hin-Chung Lam
Modified: 2012-08-28 10:48 PDT (History)
8 users (show)

See Also:


Attachments
Patch (11.30 KB, patch)
2012-08-16 15:04 PDT, Hin-Chung Lam
no flags Details | Formatted Diff | Diff
Patch (11.21 KB, patch)
2012-08-16 15:07 PDT, Hin-Chung Lam
no flags Details | Formatted Diff | Diff
Patch (11.61 KB, patch)
2012-08-16 18:26 PDT, Hin-Chung Lam
no flags Details | Formatted Diff | Diff
Patch (11.62 KB, patch)
2012-08-20 13:00 PDT, Hin-Chung Lam
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hin-Chung Lam 2012-08-16 12:56:10 PDT
BitmapImage assumes the cached size is always width * height * 4. For platforms that implement deferred image decoding or have platform image backed by a texture would use no system memory. For these cases it is best to query the platform image decoder to determine the frame size such that these frames are not managed by WebKit's memory cached.
Comment 1 Hin-Chung Lam 2012-08-16 15:04:22 PDT
Created attachment 158914 [details]
Patch
Comment 2 Hin-Chung Lam 2012-08-16 15:07:59 PDT
Created attachment 158917 [details]
Patch
Comment 3 Build Bot 2012-08-16 16:26:02 PDT
Comment on attachment 158917 [details]
Patch

Attachment 158917 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/13514553
Comment 4 Hin-Chung Lam 2012-08-16 18:26:11 PDT
Created attachment 158966 [details]
Patch
Comment 5 Dongseong Hwang 2012-08-17 00:04:36 PDT
(In reply to comment #4)
> Created an attachment (id=158966) [details]
> Patch

> Source/WebCore/platform/image-decoders/ImageDecoder.cpp
> 294    return m_size.width() * m_size.height() * 4;

You can use IntSize::area(). How about m_size.area() * sizeof(PixelData)?
Comment 6 Hin-Chung Lam 2012-08-20 13:00:25 PDT
Created attachment 159497 [details]
Patch
Comment 7 WebKit Review Bot 2012-08-28 10:48:17 PDT
Comment on attachment 159497 [details]
Patch

Clearing flags on attachment: 159497

Committed r126892: <http://trac.webkit.org/changeset/126892>
Comment 8 WebKit Review Bot 2012-08-28 10:48:20 PDT
All reviewed patches have been landed.  Closing bug.