anchor.diff:      this.ctx.fillStyle = fillStyle_orig;
     }
   
  +  void _refreshCanvas(GL.RenderingContext gl, CanvasImageSource img, int width, int height){
  +    if (width == 0 || height == 0) {
  +      return;
  +    }
  +
  +    if(_isPowerOfTwo(width) && _isPowerOfTwo(height)) {
  +      this.canvas.width = width;
  +      this.canvas.height = height;
  +    } else {
  +      this.canvas.width = _nextHighestPowerOfTwo(width);
  +      this.canvas.height = _nextHighestPowerOfTwo(height);
  +    }
  +
  +    this.ctx.drawImageScaled(img, 0, 0, this.canvas.width, this.canvas.height);
  +    this.refresh(gl);
  +  }
  +
     void refresh(GL.RenderingContext gl) {
       gl.bindTexture(GL.TEXTURE_2D, this.texture);
   
  
positive.code: part of webgl_framework;
  
  class WebGLTypedDataTexture {
    GL.Texture texture;
  
negative.code: 
      RegExp re = new RegExp(r"\.tga$", multiLine: false,caseSensitive: false);
      if(re.hasMatch(uri)) {
        var tga_loader = new TGAParser();
        tga_loader.load(uri)
        .then((tga){
          List<int> bytes = tga.getBytes();
          var tga_canvas = document.createElement("canvas") as CanvasElement;
          tga_canvas.width = tga.width;
          tga_canvas.height = tga.height;
  
          var tga_ctx = tga_canvas.getContext("2d");
          var image_data = tga_ctx.getImageData(0, 0, tga_canvas.width, tga_canvas.height);
          int length = tga.width * tga.height * 4;
          for(int i = 0; i < length; i++) {
            image_data.data[i] = bytes[i];
          }
          tga_ctx.putImageData(image_data, 0, 0);
          this._refreshCanvas(gl, tga_canvas, tga_canvas.width, tga_canvas.height);
          completer.complete(this);
        });
        return future;
      }
  
      ImageElement img = document.createElement("img");
      img.onLoad.listen((event){
        this._refreshCanvas(gl, img, img.width, img.height);
        completer.complete(this);
      });
  
  