Bug 85728 - [Cairo] Implement ImageBuffer::copyImage for BackingStoreCopy == DontCopyBackingStore
Summary: [Cairo] Implement ImageBuffer::copyImage for BackingStoreCopy == DontCopyBack...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Martin Robinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-06 00:35 PDT by Martin Robinson
Modified: 2012-05-07 16:07 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.47 KB, patch)
2012-05-06 01:30 PDT, Martin Robinson
alex: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2012-05-06 00:35:05 PDT
This is useful for supporting faster texture uploads in the TextureMapper.
Comment 1 Martin Robinson 2012-05-06 01:30:20 PDT
Created attachment 140420 [details]
Patch
Comment 2 Noam Rosenthal 2012-05-06 07:57:09 PDT
Comment on attachment 140420 [details]
Patch

I'm ok with the TextureMapper changes, please have one of the Cairo folks review the other stuff :)
Comment 3 Alejandro G. Castro 2012-05-07 10:15:25 PDT
Comment on attachment 140420 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=140420&action=review

LGTM, just a small comment.

> Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp:91
> +    return BitmapImage::create(cairo_surface_reference(m_data.m_surface)).leakRef();

I don't think the leakRef here is correct because it would returning an Image not an PassRefPtr<Image>, probably removing would be the right option.
Comment 4 Martin Robinson 2012-05-07 16:06:52 PDT
Comment on attachment 140420 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=140420&action=review

>> Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp:91
>> +    return BitmapImage::create(cairo_surface_reference(m_data.m_surface)).leakRef();
> 
> I don't think the leakRef here is correct because it would returning an Image not an PassRefPtr<Image>, probably removing would be the right option.

BitmapImage::create is returning a PassRefPtr already so the leakRef is unnecessary here. I've fixed it and pushed. Thanks for the review!
Comment 5 Martin Robinson 2012-05-07 16:07:02 PDT
Committed r116365: <http://trac.webkit.org/changeset/116365>