Bug 1317551. Make the main image drawing path ask for async notifications. r=aosmond
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 15 Nov 2016 11:28:11 -0600
changeset 439399 123e6164b536b9c4c873792dc1c5ed53a5951219
parent 439398 3ee3be133a5e9552eb9e4ba1baec86de0015330f
child 439400 63120fccd9a26e9118c6a9d1c99777f6f39fa0a8
push id36000
push userbmo:gasolin@mozilla.com
push dateWed, 16 Nov 2016 01:30:27 +0000
reviewersaosmond
bugs1317551
milestone53.0a1
Bug 1317551. Make the main image drawing path ask for async notifications. r=aosmond We don't want sync notifications during painting.
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -6424,16 +6424,18 @@ DrawImageInternal(gfxContext&           
                   const nsPoint&         aAnchor,
                   const nsRect&          aDirty,
                   const SVGImageContext* aSVGContext,
                   uint32_t               aImageFlags,
                   ExtendMode             aExtendMode = ExtendMode::CLAMP)
 {
   DrawResult result = DrawResult::SUCCESS;
 
+  aImageFlags |= imgIContainer::FLAG_ASYNC_NOTIFY;
+
   if (aPresContext->Type() == nsPresContext::eContext_Print) {
     // We want vector images to be passed on as vector commands, not a raster
     // image.
     aImageFlags |= imgIContainer::FLAG_BYPASS_SURFACE_CACHE;
   }
   if (aDest.Contains(aFill)) {
     aImageFlags |= imgIContainer::FLAG_CLAMP;
   }