Closed Bug 965096 Opened 10 years ago Closed 10 years ago

D3D9 textures should use image surfaces for ARGB

Categories

(Core :: Graphics, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: bas.schouten, Assigned: bas.schouten)

References

Details

Attachments

(2 files, 1 obsolete file)

      No description provided.
Attachment #8367061 - Flags: review?(bgirard)
Attachment #8367061 - Attachment description: use-alpha-image → Use image surfaces for ARGB content
Attached patch new textures version (obsolete) — Splinter Review
Here is the equivalent patch for the non-deprecated textures. Although it doesn't render properly not sure what I missed yet.
Ok, found my mistake, it works now.
Attachment #8367454 - Attachment is obsolete: true
Attachment #8367478 - Flags: review?(bgirard)
Comment on attachment 8367061 [details] [diff] [review]
Use image surfaces for ARGB content

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

::: gfx/layers/d3d9/TextureD3D9.cpp
@@ +863,5 @@
> +    }
> +  } else {
> +    D3DLOCKED_RECT rect;
> +    mD3D9Surface->LockRect(&rect, nullptr, 0);
> +    mSurface = new gfxImageSurface((uint8_t*)rect.pBits, ThebesIntSize(mSize), rect.Pitch, gfxImageFormatARGB32);

This needs a comment on why we can't use a gfxWindowsSurface for the reader. Here's my somewhat incomplete description:
// gfxWindowsSurface don't support transparency so we can't use the d3d9 windows surface optimization.
// Instead we have to use a gfxImageSurface and fallback for font drawing.
Attachment #8367061 - Flags: review?(bgirard) → review+
Comment on attachment 8367478 [details] [diff] [review]
Non-deprecated textures version

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

::: gfx/layers/d3d9/TextureD3D9.cpp
@@ +1340,5 @@
> +    mSurface = new gfxImageSurface((uint8_t*)rect.pBits, ThebesIntSize(mSize),
> +                                   rect.Pitch, gfxImageFormatARGB32);
> +    mLockRect = true;
> +  } else {
> +    mSurface = new gfxWindowsSurface(mD3D9Surface);

This should mirror the comment that bas will add.
Attachment #8367478 - Flags: review?(bgirard) → review+
Blocks: 899787
https://hg.mozilla.org/mozilla-central/rev/b2670ddc0c97
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: