Bug 15072

Summary: Fix ImageDecoder.cpp to not copy incoming data
Product: WebKit Reporter: Brett Wilson (Google) <brettw>
Component: ImagesAssignee: Brett Wilson (Google) <brettw>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: All   
OS: Linux   
Attachments:
Description Flags
Patch mjs: review+

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]
Patch

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]
Patch

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