Closed Bug 988904 Opened 11 years ago Closed 11 years ago

Stop creating a Thebes gfxImageSurface in PresShell::PaintRangePaintInfo

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: jwatt, Assigned: jwatt)

Details

Attachments

(1 file)

We should stop creating a Thebes gfxImageSurface in PresShell::PaintRangePaintInfo.
When we create a visual selection, it is then displayed on the screen. We should really be using gfxPlatform::CreateOffscreenContentDrawTarget, I think.
(If this really needs to be a data/CAIRO backed DrawTarget for some reason, then we can do something like: int32_t stride = pixelArea.width * BytesPerPixel(SurfaceFormat::B8G8R8A8); nsAutoArrayPtr<uint8_t> data = new uint8_t[stride * pixelArea.height]; if (!data) { return nullptr; } RefPtr<DrawTarget> dt = Factory::CreateDrawTargetForData(BackendType::CAIRO, data, IntSize(pixelArea.width, pixelArea.height), stride, SurfaceFormat::B8G8R8A8); if (!dt) { return nullptr; } dt->Clear(Rect(0, 0, pixelArea.width, pixelArea.height)); .)
Attached patch patchSplinter Review
Attachment #8397878 - Flags: review?(matt.woodrow)
Attachment #8397878 - Flags: review?(matt.woodrow) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: