B2G/gecko/browser/devtools/tilt/TiltVisualizer.jsm
/**
   * Computes the mesh vertices, texture coordinates etc. by groups of nodes.
   */
Computes the mesh vertices, texture coordinates etc. by groups of nodes.
Computes the mesh vertices texture coordinates etc . by groups of nodes .
function TVP__setupMeshData()
  {
    let renderer = this._renderer;
    if (!renderer || !renderer.context) {
      return;
    }
    this._traverseData = TiltUtils.DOM.traverse(this.contentWindow, {
      invisibleElements: INVISIBLE_ELEMENTS,
      minSize: ELEMENT_MIN_SIZE,
      maxX: this._texture.width,
      maxY: this._texture.height
    });
    let worker = new ChromeWorker(TILT_CRAFTER);
    worker.addEventListener("message", function TVP_onMessage(event) {
      this._setupMesh(event.data);
    }.bind(this), false);
    worker.postMessage({
      maxGroupNodes: MAX_GROUP_NODES,
      thickness: STACK_THICKNESS,
      style: TiltVisualizerStyle.nodes,
      texWidth: this._texture.width,
      texHeight: this._texture.height,
      nodesInfo: this._traverseData.info
    });
  }
function TVP__setupMeshData ( ) { let renderer = this . _renderer ; if ( ! renderer || ! renderer . context ) { return ; } this . _traverseData = TiltUtils . DOM . traverse ( this . contentWindow , { invisibleElements : INVISIBLE_ELEMENTS , minSize : ELEMENT_MIN_SIZE , maxX : this . _texture . width , maxY : this . _texture . height } ) ; let worker = new ChromeWorker ( TILT_CRAFTER ) ; worker . addEventListener ( "message" , function TVP_onMessage ( event ) { this . _setupMesh ( event . data ) ; } . bind ( this ) , false ) ; worker . postMessage ( { maxGroupNodes : MAX_GROUP_NODES , thickness : STACK_THICKNESS , style : TiltVisualizerStyle . nodes , texWidth : this . _texture . width , texHeight : this . _texture . height , nodesInfo : this . _traverseData . info } ) ; }
Computes the mesh vertices, texture coordinates etc.
Computes the mesh vertices texture coordinates etc .
// if the renderer was destroyed, don't continue setup // traverse the document and get the depths, coordinates and local names // calculate necessary information regarding vertices, texture coordinates // etc. in a separate thread, as this process may take a while