Closed Bug 770617 Opened 10 years ago Closed 10 years ago

SnappyTree demo doesn't re-render until I switch tabs


(Core :: Graphics, defect)

Not set





(Reporter: dholbert, Assigned: mattwoodrow)


(Blocks 1 open bug, )


(Keywords: regression)


(1 file)

 1. Load
 2. Click a preset that looks different from the initial rendering
   (e.g. the one with red leaves)
    --> Does it load?
 3. Switch to another tab, and switch back to the SnappyTree tab

The preset doesn't load until I switch tabs & switch back.

VERSION INFO: Latest x86_64 linux nightly:
Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/16.0 Firefox/16.0
Built from
Last good nightly: 2012-06-30
First bad nightly: 2012-07-01


That pushlog has DLBI in it (Bug 539356) -- assuming this is a regression from that.
Blocks: dlbi
See also bug 770686 about a similar issue with Google Maps.

(Though -- note that in bug 770686, a window-resize will fix the problem. In this bug, window-resizes don't help -- they just resize the stale tree, instead of drawing a new tree.)
Hmm, DLBI is in (at least the Mac build) but I can't reproduce this bug in that.
I can reproduce this in linux-x64/basic, but not win7/d3d10.  So a basic-layers bug.
Attachment #666282 - Flags: review?(jones.chris.g)
Comment on attachment 666282 [details] [diff] [review]
Always update canvas contents for inactive layers

This patch can regress inactive frames with inactive canvases which
are being frequently invalidated outside the canvas area, but I don't
have any evidence that that's a problem.  Compositing already-painted
canvases is pretty cheap.

>diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h
>--- a/gfx/layers/Layers.h
>+++ b/gfx/layers/Layers.h
>@@ -1385,16 +1385,36 @@ public:
>   /**
>    * Notify this CanvasLayer that the canvas surface contents have
>    * changed (or will change) before the next transaction.
>    */
>   void Updated() { mDirty = true; SetInvalidRectToVisibleRegion(); }
>   /**
>+   * Notify this CanvasLayer that the canvas surface contents have
>+   * been painted since the last change.
>+   */
>+  void Painted() { mDirty = false; }

I think this name is a little confusing, but it makes sense wrt
Updated() above.  Not your fault we chose this scheme.

>+  bool IsDirty() 
>+  { 
>+    // We can only tell if we are dirty if we're part of the
>+    // widget's retained layer tree.
>+    if (!mManager || !mManager->IsWidgetLayerManager()) {
>+      return;

Erm, I think you meant |return true|? ;)

r=me with that fix.
Attachment #666282 - Flags: review?(jones.chris.g) → review+
Are you leaving this open to write a test?
Closed: 10 years ago
Resolution: --- → FIXED
Assignee: nobody → matt.woodrow
You need to log in before you can comment on or make changes to this bug.