[Bug] Animated GIF profile photo in the title bar repaints the whole window at 10 fps forever (~28% GPU while idle)

SUMMARY

If the signed-in Google account has an animated profile photo, Antigravity puts that image
straight into the title bar img element. Chromium then animates it forever. The window
compositor produces a frame for every GIF frame, so a completely idle editor repaints 10
times per second and never stops.

On my machine this costs about 28% of the 3D engines across two GPUs, permanently.

ENVIRONMENT

Antigravity IDE, product.json version 1.107.0
Commit ecfbad74d93962fc8ca485d93ab9b4f3d4cb6cf8, build date 2026-08-13
Electron 39.2.3, Chromium 142.0.7444.175
Windows 11, build 26100
GPUs: Intel Iris Xe (integrated) and AMD Radeon RX 7900 XTX (eGPU, drives the only
display, 5120x2160)

STEPS TO REPRODUCE

  1. Set an animated GIF as the Google account profile photo.
  2. Sign in to Antigravity with that account.
  3. Leave the editor completely idle. Close every editor tab and panel.
  4. Watch GPU usage in Task Manager, or any per-process GPU counter.

MEASUREMENTS

I measured GPU engine utilization averaged over 10 one-second samples, and the frame
pipeline over a 10 second trace via the DevTools protocol. The editor was idle.

State DrawFrame/s GPU 3D AMD GPU 3D Intel


Normal (avatar visible) 11.8 16.6% 11.8%
Avatar hidden with display:none 7.2 10.5% 12.1%
Avatar and all webviews hidden 0.0 <0.5% <0.5%

The trace shows no Paint, no Layout and no running CSS animations. Only the compositor
runs. That is consistent with an animated image layer: the image decodes new frames, and
the compositor draws each one.

For comparison, Visual Studio Code on the same machine, with the same workspace and the
same extensions, uses 0.9% of one GPU and nothing on the second one.

THE ANIMATED IMAGE

The account photo in my case is:

URL: https://lh3.googleusercontent.com/a/ACg8ocJUfui3DaeDZ7AUnUeC-sI_6IhIlPYU5n1LJfXZAhjmWS11cveL=s96-c
(my own account photo, the one shown next to this post)
Content-Type: image/gif
Size: 602 KB
Dimensions: 96x96 pixels
Frames: 300, at 100 ms per frame, infinite loop

It is displayed at 16x16 in the title bar.

ROOT CAUSE IN THE SHIPPED CODE

File: resources/app/out/vs/workbench/workbench.desktop.main.js

The profile photo URL arrives from uss-userStatus as profilePictureUrl, is stored in
cachedProfileUrl, and is then assigned directly to the image element. Reformatted from the
minified bundle:

updateProfileImage(){
  if(this.profileImageContainer){
    if(Qs(this.profileImageContainer), this.getDemoModeEnabled()){
      this.demoModeProfileImage && (this.demoModeProfileImage.style.display = "flex",
        this.profileImageContainer.style.display = "none");
      return;
    }
    if(!this.cachedProfileUrl || this._authState !== "signedIn"){ /* ...hide... */ return; }
    this.container.classList.add("antigravity-profile");
    this.profileImageContainer.src = this.cachedProfileUrl;   // <-- raw URL, no frame handling
    this.profileImageContainer.style.display = "flex";
    this.demoModeProfileImage && (this.demoModeProfileImage.style.display = "none");
  }
}

Three things are missing here:

  1. No still frame. The image is used as-is, so Chromium animates it for the lifetime of
    the window.
  2. No size request. A 96x96, 602 KB image is downloaded to fill a 16x16 box.
  3. No format check. There is no canvas draw, no createImageBitmap, and no request for a
    static variant.

Note that the method already contains a non-animating path: when getDemoModeEnabled() is
true, the avatar is hidden and a static icon is shown instead. The safe path exists, but
only demo mode reaches it.

SUGGESTED FIX

Draw the first frame once and use that, for example:

const img = new Image();
img.crossOrigin = "anonymous";
img.onload = () => {
  const c = document.createElement("canvas");
  c.width = c.height = 32;              // title bar needs 16 CSS px
  c.getContext("2d").drawImage(img, 0, 0, 32, 32);
  this.profileImageContainer.src = c.toDataURL();
};
img.src = this.cachedProfileUrl;

createImageBitmap(blob) also decodes only the first frame of an animated GIF, so it works
as well. Requesting a smaller size variant from the photo service would additionally cut
the 602 KB download.

IMPACT

The bug only triggers for accounts with an animated profile photo, so most users never see
it. For those who do, the editor burns GPU and battery continuously, with nothing on screen
changing except a 16x16 icon.