B2G/gecko/browser/devtools/tilt/TiltVisualizer.jsm
/**
   * Creates or refreshes the texture applied to the visualization mesh.
   */
Creates or refreshes the texture applied to the visualization mesh.
Creates or refreshes the texture applied to the visualization mesh .
function TVP__setupTexture()
  {
    let renderer = this._renderer;
    TiltUtils.destroyObject(this._texture); this._texture = null;
    if (!renderer || !renderer.context) {
      return;
    }
    this._maxTextureSize =
      renderer.context.getParameter(renderer.context.MAX_TEXTURE_SIZE);
    this._texture = new renderer.Texture({
      source: TiltGL.TextureUtils.createContentImage(this.contentWindow,
                                                     this._maxTextureSize),
      format: "RGB"
    });
    if ("function" === typeof this._onSetupTexture) {
      this._onSetupTexture();
      this._onSetupTexture = null;
    }
  }
function TVP__setupTexture ( ) { let renderer = this . _renderer ; TiltUtils . destroyObject ( this . _texture ) ; this . _texture = null ; if ( ! renderer || ! renderer . context ) { return ; } this . _maxTextureSize = renderer . context . getParameter ( renderer . context . MAX_TEXTURE_SIZE ) ; this . _texture = new renderer . Texture ( { source : TiltGL . TextureUtils . createContentImage ( this . contentWindow , this . _maxTextureSize ) , format : "RGB" } ) ; if ( "function" === typeof this . _onSetupTexture ) { this . _onSetupTexture ( ) ; this . _onSetupTexture = null ; } }
Creates or refreshes the texture applied to the visualization mesh.
Creates or refreshes the texture applied to the visualization mesh .
// destroy any previously created texture // if the renderer was destroyed, don't continue setup // get the maximum texture size // use a simple shim to get the image representation of the document // this will be removed once the MOZ_window_region_texture bug #653656 // is finished; currently just converting the document image to a texture // applied to the mesh