Closed Bug 1029455 Opened 8 years ago Closed 8 years ago

Get rid of the Thebes backed gfxContexts in TextureD3D9

Categories

(Core :: Graphics, defect)

All
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: jwatt, Assigned: bas.schouten)

References

Details

Attachments

(1 file)

We should get rid of the Thebes backed gfxContext in TextureD3D9 and the two thebes backed gfxContexts in ThebesLayerD3D9.
Sounds like the ThebesLayerD3D9 code will be going away soon (bug 1031089). Bas tells me that converting the Thebes backed gfxContexts in that code is non-trivial, so lets just restrict this bug to the TextureD3D9 instance.
Summary: Get rid of the Thebes backed gfxContexts in TextureD3D9 and ThebesLayerD3D9 → Get rid of the Thebes backed gfxContexts in TextureD3D9
Assignee: nobody → bas
Status: NEW → ASSIGNED
Attachment #8450923 - Flags: review?(jmuizelaar)
Comment on attachment 8450923 [details] [diff] [review]
Convert SurfaceToTexture to use Moz2D directly.

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

::: gfx/layers/d3d9/TextureD3D9.cpp
@@ +296,5 @@
> +                                       gfxPlatform::GetPlatform()->Optimal2DFormatForContent(aSurface->GetContentType()));
> +    NativeSurface nativeSurf;
> +    nativeSurf.mSize = aSize;
> +    nativeSurf.mType = NativeSurfaceType::CAIRO_SURFACE;
> +    nativeSurf.mFormat = dt->GetFormat();

This is playing it pretty loose with format/content types. i.e. setting the source format to the destination format and creating the draw target destination with the format of the source.

In practice it probably works, but it would be nice if it was a little more correct. That being said, I don't have any concrete suggestions for how to improve it. In the worse case it's probably worth adding a comment acknowledging the sadness.
Attachment #8450923 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/afbf6c6ff4b5
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.