Closed
Bug 929299
Opened 11 years ago
Closed 11 years ago
fix DrawTargetSkia to not copy and render in place
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: gal, Assigned: gal)
References
Details
Attachments
(1 file, 1 obsolete file)
DrawTargetSkia copies the pixel data it is given when using InitWithData and then draws into the copy, ultimately losing it when the DT is deallocated. Instead, attach the bitmap to the pixel data and draw into that. The pixel data must stick around or this fails. I think InitWithData is meant this way.
Dito for SourceSourceSkia. It currently allocates a separate bitmap and copies the data in there. Thats very inefficient and I think not designed this way in Moz2D.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #820107 -
Flags: review?(gwright)
Comment 2•11 years ago
|
||
Comment on attachment 820107 [details] [diff] [review]
Don't allocate pixel data for DrawTargetSkia and SourceSurfaceSkia when using InitWithData.
Review of attachment 820107 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/2d/DrawTargetSkia.cpp
@@ +755,1 @@
> mSize = aSize;
bitmap never gets given the aData pointer here?
::: gfx/2d/SourceSurfaceSkia.cpp
@@ +77,5 @@
> mBitmap.unlockPixels();
> mBitmap.notifyPixelsChanged();
> mBitmap.setIsOpaque(true);
> + } else {
> + mBitmap = temp;
We can't do this because temp's pixels are currently set to aData, and CreateSourceSurfaceFromData (which in turns calls InitFromData) explicitly doesn't take ownership of aData.
Attachment #820107 -
Flags: review?(gwright) → review-
Assignee | ||
Updated•11 years ago
|
Summary: fix DrawTargetSkia and SourceSurfaceSkia → fix DrawTargetSkia to not copy and render in place
Assignee | ||
Comment 3•11 years ago
|
||
Assignee: nobody → gal
Attachment #820107 -
Attachment is obsolete: true
Attachment #825239 -
Flags: review?(gwright)
Assignee | ||
Comment 4•11 years ago
|
||
On a related note, skia silently fails to render RGB in various exciting ways, only BGR is handled properly in most paths. Is that intentional?
Updated•11 years ago
|
Attachment #825239 -
Flags: review?(gwright) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 5•11 years ago
|
||
Keywords: checkin-needed
Comment 6•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in
before you can comment on or make changes to this bug.
Description
•