зеркало из https://github.com/mozilla/pjs.git
Bug 703463 - Let SourceSurfaceSkia snapshots take ownership of DrawTargetSkia pixel data when it is destroyed. r=jrmuizel
This commit is contained in:
Родитель
823bce8cd1
Коммит
1fe8fa86c4
|
@ -171,7 +171,14 @@ DrawTargetSkia::DrawTargetSkia()
|
|||
|
||||
DrawTargetSkia::~DrawTargetSkia()
|
||||
{
|
||||
MarkChanged();
|
||||
if (mSnapshots.size()) {
|
||||
for (std::vector<SourceSurfaceSkia*>::iterator iter = mSnapshots.begin();
|
||||
iter != mSnapshots.end(); iter++) {
|
||||
(*iter)->DrawTargetDestroyed();
|
||||
}
|
||||
// All snapshots will now have copied data.
|
||||
mSnapshots.clear();
|
||||
}
|
||||
}
|
||||
|
||||
TemporaryRef<SourceSurface>
|
||||
|
|
|
@ -129,6 +129,12 @@ SourceSurfaceSkia::DrawTargetWillChange()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
SourceSurfaceSkia::DrawTargetDestroyed()
|
||||
{
|
||||
mDrawTarget = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
SourceSurfaceSkia::MarkIndependent()
|
||||
{
|
||||
|
@ -138,6 +144,5 @@ SourceSurfaceSkia::MarkIndependent()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@ private:
|
|||
friend class DrawTargetSkia;
|
||||
|
||||
void DrawTargetWillChange();
|
||||
void DrawTargetDestroyed();
|
||||
void MarkIndependent();
|
||||
|
||||
SkBitmap mBitmap;
|
||||
|
|
Загрузка…
Ссылка в новой задаче