In <http://trac.webkit.org/changeset/213618>, the large async image decoding was requested for all the images in the tileCoverageRect of the tileGrid. This turned out to be inefficient approach because tileCoverageRect represents the rectangle from the page that should be cached in tiles. This rectangle includes dirty and clean rectangles. But when requesting the async image decoding, we enumerate all the images in tileCoverageRect regardless whether they are in dirty rects, i.e. they are going to be drawn. Or they are in clean rects, i.e. they are not going to be drawn. This causes more CPU to be wasted needlessly. And more importantly a memory regression due to aggressive async decoding for images which are not going to be drawn. These images were drawn on tiles and those tiles were kept clean so their frames were destroyed by the MemoryCache to keep the memory under control. But requesting the async decoding for those images, bring their frames back to memory. The fix is to request the async image decoding only at the time that a BitmapImage is drawn. This is the time that we are sure, a BitmapImage needs to be drawn. It also fixes the scaling and transformation that we need to apply to sizeForDrawing since all of them have to be applied to the GraphicsContext.
<rdar://problem/30948700>
<http://trac.webkit.org/changeset/213618> was rolled out. No need for this bug anymore. *** This bug has been marked as a duplicate of bug 165039 ***