Bug 1366097 - Part 7. VectorImage::Show should delegate to ImageResource::NotifyDrawingObservers. r=tnikkel

This commit is contained in:
Andrew Osmond 2017-11-17 14:08:52 -05:00
parent b257c6e489
commit 2278b250dc

View File

@ -1166,17 +1166,7 @@ VectorImage::Show(gfxDrawable* aDrawable, const SVGDrawingParameters& aParams)
aParams.flags, aParams.opacity);
#ifdef DEBUG
// Record the image drawing for startup performance testing.
if (NS_IsMainThread()) {
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
NS_WARNING_ASSERTION(obs, "Can't get an observer service handle");
if (obs) {
nsCOMPtr<nsIURI> imageURI = mURI->ToIURI();
nsAutoCString spec;
imageURI->GetSpec(spec);
obs->NotifyObservers(nullptr, "image-drawing", NS_ConvertUTF8toUTF16(spec).get());
}
}
NotifyDrawingObservers();
#endif
MOZ_ASSERT(mRenderingObserver, "Should have a rendering observer by now");