Bug 67358

Summary: [skia] States of GraphicsContext may never be restored after clipToImageBuffer
Product: WebKit Reporter: Robin Cao <robin.webkit>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: jamesr, senorblanco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch none

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.