mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1231564 - Don't trigger new composites just to repaint debug overlays. r=BenWa
This commit is contained in:
parent
eea4678543
commit
824f13d65a
@ -430,7 +430,7 @@ LayerManagerComposite::UpdateAndRender()
|
||||
|
||||
// We don't want our debug overlay to cause more frames to happen
|
||||
// so we will invalidate after we've decided if something changed.
|
||||
InvalidateDebugOverlay(mRenderBounds);
|
||||
InvalidateDebugOverlay(invalid, mRenderBounds);
|
||||
|
||||
if (!didEffectiveTransforms) {
|
||||
// The results of our drawing always go directly into a pixel buffer,
|
||||
@ -521,23 +521,18 @@ LayerManagerComposite::RootLayer() const
|
||||
#endif
|
||||
|
||||
void
|
||||
LayerManagerComposite::InvalidateDebugOverlay(const IntRect& aBounds)
|
||||
LayerManagerComposite::InvalidateDebugOverlay(nsIntRegion& aInvalidRegion, const IntRect& aBounds)
|
||||
{
|
||||
bool drawFps = gfxPrefs::LayersDrawFPS();
|
||||
bool drawFrameCounter = gfxPrefs::DrawFrameCounter();
|
||||
bool drawFrameColorBars = gfxPrefs::CompositorDrawColorBars();
|
||||
|
||||
if (drawFps || drawFrameCounter) {
|
||||
AddInvalidRegion(nsIntRect(0, 0, 256, 256));
|
||||
aInvalidRegion.Or(aInvalidRegion, nsIntRect(0, 0, 256, 256));
|
||||
}
|
||||
if (drawFrameColorBars) {
|
||||
AddInvalidRegion(nsIntRect(0, 0, 10, aBounds.height));
|
||||
aInvalidRegion.Or(aInvalidRegion, nsIntRect(0, 0, 10, aBounds.height));
|
||||
}
|
||||
|
||||
if (drawFrameColorBars) {
|
||||
AddInvalidRegion(nsIntRect(0, 0, 10, aBounds.height));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static uint16_t sFrameCount = 0;
|
||||
|
@ -328,7 +328,7 @@ private:
|
||||
/**
|
||||
* We need to know our invalid region before we're ready to render.
|
||||
*/
|
||||
void InvalidateDebugOverlay(const gfx::IntRect& aBounds);
|
||||
void InvalidateDebugOverlay(nsIntRegion& aInvalidRegion, const gfx::IntRect& aBounds);
|
||||
|
||||
/**
|
||||
* Render debug overlays such as the FPS/FrameCounter above the frame.
|
||||
|
Loading…
Reference in New Issue
Block a user