Closed Bug 590366 Opened 15 years ago Closed 15 years ago

[D3D9] Clear retained area when creating a new texture

Categories

(Core :: Graphics, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 592024

People

(Reporter: mattwoodrow, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Attached patch Clearing! (obsolete) — Splinter Review
Attachment #468872 - Flags: review?(bas.schouten)
Blocks: 586459
Comment on attachment 468872 [details] [diff] [review] Clearing! >From: Matt Woodrow <mwoodrow@mozilla.com> > >diff --git a/gfx/layers/d3d9/ThebesLayerD3D9.cpp b/gfx/layers/d3d9/ThebesLayerD3D9.cpp >--- a/gfx/layers/d3d9/ThebesLayerD3D9.cpp >+++ b/gfx/layers/d3d9/ThebesLayerD3D9.cpp >@@ -450,6 +455,8 @@ ThebesLayerD3D9::CreateNewTexture(const > D3DUSAGE_RENDERTARGET, UseOpaqueSurface(this) ? D3DFMT_X8R8G8B8 : D3DFMT_A8R8G8B8, > D3DPOOL_DEFAULT, getter_AddRefs(mTexture), NULL); > } >+ >+ mValidRegion = nsIntRegion(); > } > > } /* namespace layers */ mValidRegion.SetEmpty() is better.
Attachment #468872 - Flags: review?(bas.schouten) → review+
We're clearing the retained texture on scrolling because the visible region changes. I could look at copying valid content from the old texture across and/or keeping a retained texture larger than the current visible region if you think that's worthwhile.
Attachment #468872 - Attachment is obsolete: true
Attachment #468990 - Flags: review+
On further looking, clearing the mValidRegion isn't a great solution because it means we redraw the entire ThebesLayer contents when scrolling. This bug appears to be intermittent and only when using d2d surfaces. I copied the contents of mD2DSurface to an image surface before and after StretchRect (inside SetValidRegion) and it appeared to be copying all black to the new texture. Might be a driver related issue of some sort? I'd suggest landing this patch for the time being (especially if anyone else can reproduce the problem) and look into it further before release.
This will be fixed by bug 592024
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: