docs: function(prepareTiles, rendererHelper,
          visited, flowEvents, sortedRasterizerSlices) {
        if (!prepareTiles.args.prepare_tiles_id)
          return;
  
        if (!rendererHelper || !rendererHelper.rasterWorkerThreads)
          return;
  
        var rasterWorkerThreads = rendererHelper.rasterWorkerThreads;
        var prepare_tile_id = prepareTiles.args.prepare_tiles_id;
        var pendingEventQueue = [];
  
        // Collect all the rasterizer tasks. Return the cached copy if possible.
        if (sortedRasterizerSlices.length === 0)
          this.sortRasterizerSlices(rasterWorkerThreads, sortedRasterizerSlices);
  
        // TODO(yuhao): Once TaskSetFinishedTaskImpl also get the prepare_tile_id
        // we can simply track by checking id rather than counting.
        var numFinishedTasks = 0;
        var RASTER_TASK_TITLE = 'RasterizerTaskImpl::RunOnWorkerThread';
        var IMAGEDECODE_TASK_TITLE = 'ImageDecodeTaskImpl::RunOnWorkerThread';
        var FINISHED_TASK_TITLE = 'TaskSetFinishedTaskImpl::RunOnWorkerThread';
  
        for (var i = 0; i < sortedRasterizerSlices.length; i++) {
          var task = sortedRasterizerSlices[i];
  
          if (task.title === RASTER_TASK_TITLE ||
              task.title === IMAGEDECODE_TASK_TITLE) {
            if (task.args.source_prepare_tiles_id === prepare_tile_id)
              this.addEntireSliceHierarchy(task.mostTopLevelSlice);
          } else if (task.title === FINISHED_TASK_TITLE) {
            if (task.start > prepareTiles.start) {
              pendingEventQueue.push(task.mostTopLevelSlice);
              if (++numFinishedTasks === 3)
                break;
            }
          }
        }
  
        // Trace PostTask from rasterizer tasks.
        while (pendingEventQueue.length != 0) {
          var event = pendingEventQueue.pop();
  
          this.addEntireSliceHierarchy(event);
          this.followSubsequentSlices(event, pendingEventQueue, visited,
              flowEvents);
        }
      }