Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Andrew Osmond 42e6712830 Bug 1388332 - Fix a shutdown crash when destroying image decoders before initializing its SurfacePipe. r=tnikkel
A default constructed SurfacePipe contains a NullSurfaceSink as its
filter in mHead. This filter does nothing and is merely a placeholder.
Since most SurfacePipe objects are constructed with the default
constructor, and NullSurfaceSink has no (modified) state, we use a
singleton to represent it. Normally the SurfacePipe owns its filter, so
it needs to do a special check for NullSurfaceSink to ensure it doesn't
free it explicitly.

A Decoder object contains a default constructed SurfacePipe until it
needs to create the first frame from an image. This is a very brief
window because it does not take very long or much data to get to this
stage of decoding.

The NullSurfaceSink singleton is freed upon shutdown, however some
ISurfaceProvider objects may be lingering after this. If their Decoder
has yet to create the first frame, that means the SurfacePipe actually
contains a dangling pointer to the already freed singleton. To make
things worse, it actually tried to free the filter because it didn't
match the singleton (it got freed!).

As such, this change removes NullSurfaceSink entirely. We never use the
SurfacePipe before initializing it with a proper filter, and it would be
considered a programming error to do so. Instead let SurfacePipe::mHead
be null, and assert that it is not null when any operations are
performed on the SurfacePipe.
2017-08-09 06:54:55 -04:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Daniel Holbert c1e322c6c5 Bug 1282670, part 1: Add missing #include & "using" declarations in imagelib. r=seth
I found these issues locally by moving all of imagelib's .cpp files to SOURCES instead of UNIFIED_SOURCES.  (That change isn't part of this patch, though.)

MozReview-Commit-ID: 97Xpfu8eFE6
2016-06-30 10:24:27 -07:00
Seth Fowler 020ad7a755 Bug 1279117 - Add SurfacePipe::WritePixelsToRow(). r=njn 2016-06-23 01:42:07 -07:00
Seth Fowler 72f2253f92 Bug 1279617 - When SurfacePipe::WritePixels() finishes early, zero out the rest of the surface. r=njn 2016-06-17 15:05:00 -07:00
Seth Fowler bf26782297 Bug 1279611 - Document and test the fact that SurfacePipe::WriteEmptyRow() overwrites the entire row. r=njn 2016-06-17 15:05:00 -07:00
Seth Fowler b65d22bc5c Bug 1276061 (Part 2) - Remove SurfaceFilter::WriteRows(). r=njn
--HG--
extra : rebase_source : f7d65f2cb1398c49f10a5b2849672661c74f1163
2016-06-01 23:01:50 -07:00
Seth Fowler 28eebc3a4a Bug 1276061 (Part 1) - Add SurfaceFilter::WriteBuffer() and SurfaceFilter::WriteEmptyRow(). r=njn
--HG--
extra : rebase_source : bbb366a108c9cc79e250aee00dd61c31aca54108
2016-06-01 23:01:49 -07:00
Seth Fowler 9e70cde635 Bug 1262338 (Part 1) - Ensure that SurfaceFilter always knows when AdvanceRow() is called. r=njn 2016-05-25 22:48:29 -07:00
Seth Fowler 875464424a Bug 1247152 (Part 1) - Use SurfacePipe in the GIF decoder. r=njn 2016-03-09 15:39:02 -08:00
Seth Fowler b1ec50b23f Bug 1246851 (Part 1) - Add a new SurfacePipe API for writing to image surfaces in a safe and composable manner. r=njn 2016-02-25 16:21:29 -08:00