Convert WinUtils consumer of imgIContainer::GetFrame to act on a Moz2D SourceSurface

RESOLVED FIXED in mozilla30

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

29 Branch
mozilla30
All
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

We should convert the WinUtils consumer of imgIContainer::GetFrame to act on a Moz2D SourceSurface.
Posted patch patchSplinter Review
Attachment #8388233 - Flags: review?(matt.woodrow)
Comment on attachment 8388233 [details] [diff] [review]
patch

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

::: widget/windows/WinUtils.cpp
@@ +763,5 @@
> +                 ColorPattern(Color(1.0f, 1.0f, 1.0f, 1.0f)));
> +    dt->DrawSurface(surface,
> +                    Rect(16, 16, 16, 16),
> +                    Rect(Point(0, 0),
> +                         Size(surface->GetSize().width, surface->GetSize().height)));

This will scale the input surface to 16x16, the old code just drew 16x16 pixels from the top left of it.

See http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxContext.cpp#595

@@ +778,5 @@
>    }
>  
> +  // Allocate a new buffer that we own and can use out of line in
> +  // another thread.
> +  uint8_t *data = SurfaceToPackedBGRA(dataSurface);

Still an unnecessary copy here in the mURLShortcut case, but not a regression so I guess nobody cares too much.
Attachment #8388233 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/c25dfac7ab7b
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Depends on: 992406
You need to log in before you can comment on or make changes to this bug.