mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 676690 - Don't release DataSourceSurface pointers until we have finished accessing the pixels. r=Bas
This commit is contained in:
parent
58225fa30e
commit
420d8a8863
@ -4098,11 +4098,12 @@ nsCanvasRenderingContext2DAzure::GetImageData_explicit(PRInt32 x, PRInt32 y, PRU
|
||||
|
||||
PRUint8 *src = aData;
|
||||
PRUint32 srcStride = w * 4;
|
||||
|
||||
|
||||
RefPtr<DataSourceSurface> readback;
|
||||
if (!srcReadRect.IsEmpty()) {
|
||||
RefPtr<SourceSurface> snapshot = mTarget->Snapshot();
|
||||
|
||||
RefPtr<DataSourceSurface> readback = snapshot->GetDataSurface();
|
||||
readback = snapshot->GetDataSurface();
|
||||
|
||||
srcStride = readback->Stride();
|
||||
src = readback->GetData() + srcReadRect.y * srcStride + srcReadRect.x * 4;
|
||||
|
Loading…
Reference in New Issue
Block a user