Bug 96082 - Fix FilterTypeZoom to properly call canvas->restore()
Summary: Fix FilterTypeZoom to properly call canvas->restore()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zachary Kuznia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-07 01:18 PDT by Zachary Kuznia
Modified: 2012-09-11 09:44 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.46 KB, patch)
2012-09-07 01:19 PDT, Zachary Kuznia
no flags Details | Formatted Diff | Diff
Patch (3.36 KB, patch)
2012-09-09 22:34 PDT, Zachary Kuznia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zachary Kuznia 2012-09-07 01:18:35 PDT
Fix FilterTypeZoom to properly call canvas->restore()
Comment 1 Zachary Kuznia 2012-09-07 01:19:58 PDT
Created attachment 162703 [details]
Patch
Comment 2 Adrienne Walker 2012-09-07 09:50:47 PDT
Comment on attachment 162703 [details]
Patch

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

> Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:443
> -            canvas->drawBitmap(state.source(), 0, 0);
> +            canvas->drawSprite(state.source(), 0, 0, &paint);

Not being a Skia expert, can you explain this change? I see that the difference between drawSprite and drawBitmap is that drawSprite ignores the transform on the canvas, but I don't understand why you would want to do that here.
Comment 3 Zachary Kuznia 2012-09-09 22:34:36 PDT
Created attachment 163040 [details]
Patch
Comment 4 Zachary Kuznia 2012-09-09 22:36:21 PDT
(In reply to comment #2)
> (From update of attachment 162703 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=162703&action=review
> 
> > Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:443
> > -            canvas->drawBitmap(state.source(), 0, 0);
> > +            canvas->drawSprite(state.source(), 0, 0, &paint);
> 
> Not being a Skia expert, can you explain this change? I see that the difference between drawSprite and drawBitmap is that drawSprite ignores the transform on the canvas, but I don't understand why you would want to do that here.

Upon further investigation, it seems that "canvas->Restore()" was sufficient, so I reverted this call.
Comment 5 Adrienne Walker 2012-09-10 10:46:39 PDT
Comment on attachment 163040 [details]
Patch

R=me.
Comment 6 WebKit Review Bot 2012-09-11 09:44:11 PDT
Comment on attachment 163040 [details]
Patch

Clearing flags on attachment: 163040

Committed r128196: <http://trac.webkit.org/changeset/128196>
Comment 7 WebKit Review Bot 2012-09-11 09:44:14 PDT
All reviewed patches have been landed.  Closing bug.