[Webkit-unassigned] [Bug 124209] [Cairo] Avoid extra copy when drawing images

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 2 09:18:21 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=124209


Carlos Garcia Campos <cgarcia at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #12 from Carlos Garcia Campos <cgarcia at igalia.com>  2013-12-02 09:16:41 PST ---
(In reply to comment #11)
> (In reply to comment #10)
> > (From update of attachment 216982 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=216982&action=review
> > 
> > > Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp:176
> > > +    RefPtr<cairo_surface_t> subsurface;
> > 
> > This doesn't seem to be used outside the if context, I think it could be moved to the if block.
> > 
> > > Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp:179
> > > +    if (srcRect.x() || srcRect.y() || srcRect.size() == cairoSurfaceSize(surface)) {
> > 
> > If I understood correctly the commit message, you want to use a subsurface when source size is different to surface size, right?
> 
> Right. I got the line from Robinson review without double check, my bad.
> 
> > 
> > > Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp:187
> > > +        subsurface = adoptRef(cairo_surface_create_for_rectangle(surface, expandedSrcRect.x(),
> > > +            expandedSrcRect.y(), expandedSrcRect.width(), expandedSrcRect.height()));
> > > +        patternSurface = subsurface.get();
> > 
> > Maybe you don't even need to subsurface variable if you use a single lines here:
> > 
> > patternSurface = adoptRef(cairo_surface_create_for_rectangle(surface, expandedSrcRect.x(), expandedSrcRect.y(), expandedSrcRect.width(), expandedSrcRect.height()));
> 
> Ok.
> 
> The question is: the patch has already landed. How to proceed?

I don't think we need to roll it out, since it hasn't broken anything, I'm reopening the bug and you can just upload a new patch.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list