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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 2 07:27:50 PST 2013


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





--- Comment #11 from Aloisio Almeida Jr <aloisio.almeida at openbossa.org>  2013-12-02 07:26:10 PST ---
(In reply to comment #10)
> (From update of attachment 216982 [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?

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