summaryrefslogtreecommitdiffstats
path: root/webkit/glue/image_decoder.cc
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-13 04:58:22 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-13 04:58:22 +0000
commit6bf0094a64c94e676ad37cfd6b866c54ee9e1c2d (patch)
tree361b5f091b686bec4a16db01c5e6ed85f6ddb120 /webkit/glue/image_decoder.cc
parentb3e6d6d2c0f5bb7640e912774d0417cc5f09a5ca (diff)
downloadchromium_src-6bf0094a64c94e676ad37cfd6b866c54ee9e1c2d.zip
chromium_src-6bf0094a64c94e676ad37cfd6b866c54ee9e1c2d.tar.gz
chromium_src-6bf0094a64c94e676ad37cfd6b866c54ee9e1c2d.tar.bz2
Stop crash in renderer at the end of displaying
http://dev.chromium.org. Now that webkit merge has landed, actually create a RenderView in RenderThread. With these changes, there is only manual tweak needed (locally called "disable-button.diff") to get bits on the screen for OSX without crashing. Review URL: http://codereview.chromium.org/20349 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/image_decoder.cc')
-rw-r--r--webkit/glue/image_decoder.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/glue/image_decoder.cc b/webkit/glue/image_decoder.cc
index b67e0bb..946f4b3 100644
--- a/webkit/glue/image_decoder.cc
+++ b/webkit/glue/image_decoder.cc
@@ -75,6 +75,13 @@ SkBitmap ImageDecoder::Decode(const unsigned char* data, size_t size) const {
result.setConfig(SkBitmap::kARGB_8888_Config, CGImageGetWidth(image.get()),
CGImageGetHeight(image.get()));
+ // TODO(port):
+ // This line is a waste, but is needed when the renderer sends a
+ // ViewHostMsg_DidDownloadImage and tries to pickle the SkBitmap.
+ // Presumably this will be removed when we (ImageDecoder::Decode())
+ // are changed to not return a fake SkBitmap.
+ result.allocPixels();
+
RetainPtr<CGColorSpace> cg_color(AdoptCF, CGColorSpaceCreateDeviceRGB());
// The last parameter is a total guess. Feel free to adjust it if images draw
// incorrectly. TODO(avi): Verify byte ordering; it should be possible to