Bug 67358 - [skia] States of GraphicsContext may never be restored after clipToImageBuffer
Summary: [skia] States of GraphicsContext may never be restored after clipToImageBuffer
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: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-31 22:19 PDT by Robin Cao
Modified: 2011-09-06 11:12 PDT (History)
3 users (show)

See Also:


Attachments
patch (5.16 KB, patch)
2011-09-01 01:28 PDT, Robin Cao
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Cao 2011-08-31 22:19:00 PDT
States of GraphicsContext may never be restored after clipToImageBuffer.

Skia doesn't support clipping to an image, so it creates a layer to implement this.
See PlatformContextSkia::beginLayerClippedToImage and PlatformContextSkia::applyClipFromImage

But in some cases, such as clipping to an empty ImageBuffer, beginLayerClippedToImage/applyClipFromImage are mismatched, which will make states of GraphicsContext busted.
Comment 1 Robin Cao 2011-09-01 01:28:14 PDT
Created attachment 105923 [details]
patch
Comment 2 Robin Cao 2011-09-01 20:46:48 PDT
CCing experts on this area.
Comment 3 James Robinson 2011-09-06 11:00:09 PDT
Comment on attachment 105923 [details]
patch

R=me
Comment 4 WebKit Review Bot 2011-09-06 11:12:26 PDT
Comment on attachment 105923 [details]
patch

Clearing flags on attachment: 105923

Committed r94581: <http://trac.webkit.org/changeset/94581>
Comment 5 WebKit Review Bot 2011-09-06 11:12:30 PDT
All reviewed patches have been landed.  Closing bug.