Closed
Bug 988904
Opened 11 years ago
Closed 11 years ago
Stop creating a Thebes gfxImageSurface in PresShell::PaintRangePaintInfo
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: jwatt, Assigned: jwatt)
Details
Attachments
(1 file)
|
1.78 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
We should stop creating a Thebes gfxImageSurface in PresShell::PaintRangePaintInfo.
| Assignee | ||
Comment 1•11 years ago
|
||
When we create a visual selection, it is then displayed on the screen. We should really be using gfxPlatform::CreateOffscreenContentDrawTarget, I think.
| Assignee | ||
Comment 2•11 years ago
|
||
(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));
.)
| Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8397878 -
Flags: review?(matt.woodrow)
Updated•11 years ago
|
Attachment #8397878 -
Flags: review?(matt.woodrow) → review+
| Assignee | ||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
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.
Description
•