Bug 15072 - Fix ImageDecoder.cpp to not copy incoming data
Summary: Fix ImageDecoder.cpp to not copy incoming data
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 523.x (Safari 3)
Hardware: All Linux
: P2 Normal
Assignee: Brett Wilson (Google)
Depends on:
Reported: 2007-08-24 13:33 PDT by Brett Wilson (Google)
Modified: 2007-09-04 23:17 PDT (History)
0 users

See Also:

Patch (9.53 KB, patch)
2007-08-24 14:23 PDT, Brett Wilson (Google)
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brett Wilson (Google) 2007-08-24 13:33:21 PDT
ImageDecoder.cpp (not used by Mac, but used by various other ports) makes a copy of the incoming data and puts it into a Vector. This is unnecessary since the data is originally in a SharedBuffer that is designed not to be copied.
Comment 1 Brett Wilson (Google) 2007-08-24 14:23:24 PDT
Created attachment 16110 [details]

This patch changes ImageDecoder.setData to take a SharedBuffer*, and I updated the other Cairo image decoders. This also fixes two compiler warnings (unused variable and a for loop type mismatch).
Comment 2 Maciej Stachowiak 2007-09-04 11:38:38 PDT
Comment on attachment 16110 [details]

Comment 3 Mark Rowe (bdash) 2007-09-04 23:17:36 PDT
Landed in r25368.