public void endDraw() {
    // hm, mark pixels as changed, because this will instantly do a full
    // copy of all the pixels to the surface.. so that's kind of a mess.
    //updatePixels();

    // TODO this is probably overkill for most tasks...
    if (!primarySurface) {
      loadPixels();
    }
    modified = true;
  }