Bug 56134

Summary: PlatformContextSkia should flush GrContext in destructor
Product: WebKit Reporter: Brian Salomon <bsalomon>
Component: PlatformAssignee: Brian Salomon <bsalomon>
Status: RESOLVED FIXED    
Severity: Normal CC: bsalomon, commit-queue, kbr, reed, vangelis
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
fix
none
patch none

Description Brian Salomon 2011-03-10 12:49:49 PST
When a PlatformContextSkia is backed by a GrContext it should flush the GrContext in its destructor. Otherwise, the GrRenderTarget that the skia canvas is drawing into refers to a DrawingBuffer's FBO id that may be destroyed before the next time the GrContext is flushed.
Comment 1 Brian Salomon 2011-03-10 12:51:33 PST
Created attachment 85377 [details]
fix

This patch also changes the parameter passed to GrContext::flush from a boolean to a int. A recent change to skia made this parameter a bitfield of flags rather than a boolean.
Comment 2 Brian Salomon 2011-03-10 12:56:35 PST
Created attachment 85378 [details]
patch
Comment 3 Kenneth Russell 2011-03-10 13:48:33 PST
Comment on attachment 85378 [details]
patch

Looks fine.
Comment 4 WebKit Commit Bot 2011-03-11 00:07:04 PST
Comment on attachment 85378 [details]
patch

Clearing flags on attachment: 85378

Committed r80826: <http://trac.webkit.org/changeset/80826>
Comment 5 WebKit Commit Bot 2011-03-11 00:07:09 PST
All reviewed patches have been landed.  Closing bug.