Bug 887927 - Hold a ref to DrawTargetSkia within SourceSurfaceSkia r=mattwoodrow

This commit is contained in:
James Willcox 2013-06-28 22:59:19 -04:00
parent 7f3c72754a
commit a9ed9eaf16
3 changed files with 2 additions and 15 deletions

View File

@ -87,14 +87,7 @@ DrawTargetSkia::DrawTargetSkia()
DrawTargetSkia::~DrawTargetSkia()
{
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();
}
MOZ_ASSERT(mSnapshots.size() == 0);
}
TemporaryRef<SourceSurface>

View File

@ -108,12 +108,6 @@ SourceSurfaceSkia::DrawTargetWillChange()
}
}
void
SourceSurfaceSkia::DrawTargetDestroyed()
{
mDrawTarget = nullptr;
}
void
SourceSurfaceSkia::MarkIndependent()
{

View File

@ -53,7 +53,7 @@ private:
SurfaceFormat mFormat;
IntSize mSize;
int32_t mStride;
DrawTargetSkia* mDrawTarget;
RefPtr<DrawTargetSkia> mDrawTarget;
bool mLocked;
};