mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 04:27:41 +00:00
Bug 534787: Properly flush and markdirty image surfaces on Locking/Unlocking image data. r=jrmuizel
This commit is contained in:
parent
3734f540df
commit
930550ada6
@ -849,6 +849,11 @@ nsresult imgFrame::LockImageData()
|
||||
#endif
|
||||
}
|
||||
|
||||
// We might write to the bits in this image surface, so we need to make the
|
||||
// surface ready for that.
|
||||
if (mImageSurface)
|
||||
mImageSurface->Flush();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -864,7 +869,13 @@ nsresult imgFrame::UnlockImageData()
|
||||
|
||||
mLocked = PR_FALSE;
|
||||
|
||||
// Assume we've been written to.
|
||||
if (mImageSurface)
|
||||
mImageSurface->MarkDirty();
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// The quartz image surface (ab)uses the flush method to get the
|
||||
// cairo_image_surface data into a CGImage, so we have to call Flush() here.
|
||||
if (mQuartzSurface)
|
||||
mQuartzSurface->Flush();
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user