Bug 1366097 - Part 7. VectorImage::Show should delegate to ImageResource::NotifyDrawingObservers. r=tnikkel
authorAndrew Osmond <aosmond@mozilla.com>
Fri, 17 Nov 2017 14:08:52 -0500
changeset 436911 71c36630c1416531830ae699dc766d118f83a4b5
parent 436910 e65c223336d99d8e7fae360b2fd3c1b10a91d531
child 436912 3395c151dabbf8fd4d2ee869d81be344cfe74570
push id117
push userfmarier@mozilla.com
push dateTue, 28 Nov 2017 20:17:16 +0000
reviewerstnikkel
bugs1366097
milestone59.0a1
Bug 1366097 - Part 7. VectorImage::Show should delegate to ImageResource::NotifyDrawingObservers. r=tnikkel
image/VectorImage.cpp
--- a/image/VectorImage.cpp
+++ b/image/VectorImage.cpp
@@ -1161,27 +1161,17 @@ VectorImage::Show(gfxDrawable* aDrawable
   gfxUtils::DrawPixelSnapped(aParams.context, aDrawable,
                              SizeDouble(aParams.size),
                              aParams.region,
                              SurfaceFormat::B8G8R8A8,
                              aParams.samplingFilter,
                              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");
   mRenderingObserver->ResumeHonoringInvalidations();
 }
 
 void
 VectorImage::RecoverFromLossOfSurfaces()