Closed Bug 1009184 Opened 10 years ago Closed 10 years ago

ASSERTION: Empty paint region '!aPaintRegion.GetBounds().IsEmpty()'

Categories

(Core :: Graphics: Layers, defect)

Other
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file, 1 obsolete file)

Ever since the tiling code landed in bug 783368 there has been a codepath that unconditionally triggers this assertion failure. In current code, the call site at [2] passes in a empty paint region to the function which then asserts at [1]. This code appears to have not really been exercised, but in bug 1001438 the changes I'm making seem to make it exercised in some cases (some Android 4.0 debug jobs on tbpl).

[1] http://mxr.mozilla.org/mozilla-central/source/gfx/layers/client/TiledContentClient.cpp?rev=9e5a13343d60#640
[2] http://mxr.mozilla.org/mozilla-central/source/gfx/layers/client/ClientTiledThebesLayer.cpp?rev=bd59c5ef0677#396
Comment on attachment 8421689 [details] [diff] [review]
Explicitly clear the valid region and retained tiles instead of doing an empty paint

Review of attachment 8421689 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM, but BenWa might want to comment on changes to TiledLayerBuffer.
Attachment #8421689 - Flags: review?(chrislord.net)
Attachment #8421689 - Flags: review+
Attachment #8421689 - Flags: feedback?(bgirard)
Comment on attachment 8421689 [details] [diff] [review]
Explicitly clear the valid region and retained tiles instead of doing an empty paint

Review of attachment 8421689 [details] [diff] [review]:
-----------------------------------------------------------------

f+ with the following change.

::: gfx/layers/TiledLayerBuffer.h
@@ +125,4 @@
>    void ClearPaintedRegion() { mPaintedRegion.SetEmpty(); }
>  
> +  void ClearRetainedTiles() {
> +    mRetainedWidth = 0;

ClearRetainedTiles is a public API but if called directly without a ClearValidRegion then this object will be left in an inconsistent state. It will have a valid region but it wont have the tiles for that valid region. This function should include a call to ClearValidRegion().

We should probably also clear mPaintedRegion.

Likewise can you justify ClearValidRegion being a public API on its own? If it's called it will leave the object in an inconsistent state.
Attachment #8421689 - Flags: feedback?(bgirard) → feedback+
I wasn't sure if clearing mValidRegion without clearing mRetainedTiles was actually an inconsistent state. But it certainly isn't useful. You're right, I'll combine all of it into a single function that clears everything.
Attachment #8421833 - Flags: review?(bgirard) → review+
https://hg.mozilla.org/mozilla-central/rev/651bb7ad725c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: