Commit Graph

2065 Commits

Author SHA1 Message Date
Eric Rahm
439b783afc Bug 1194555 - Part 3: Remove |getReportsForThisProcess| from the nsIMemoryReporterManager interface. r=njn
|getReportsForThisProcess| differs from |getReports| in that it is limited to current process and is synchronous. When asynchronous memory reporters are added the function will no longer be able tobe synchronous. There isn't much utility in only measuring the current process, so we can remove the function and switch existing users to |getReports|.
2015-10-14 16:52:55 -07:00
Seth Fowler
b5df412f06 Bug 1209715 - Add operator overloads for combining DrawResults. r=tn 2015-10-13 23:21:39 -07:00
Seth Fowler
d5d3d3f89e Bug 594505 - Remove obsolete comment since this bug has now been fixed. r=me DONTBUILD 2015-10-12 18:45:19 -07:00
Hiroyuki Ikezoe
dd1c422ef6 Bug 1167627 - Part 8: Use mozinfo in image/. 2015-08-25 15:01:00 +02:00
Tom Klein
9524cbb750 Bug 1212954 - Make BaseSize::IsEmpty return true for negative sizes to avoid NS_ERROR in VectorImage::GetFrameAtSize when root svg doesn't have intrinsic width or height. r=roc 2015-10-11 18:13:10 +02:00
Carsten "Tomcat" Book
d7f143eaad Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Nicholas Nethercote
0c9936d9d3 Bug 1211324 (part 5) - Remove GraphicsFilter and gfxGraphicsFilter. r=mattwoodrow. 2015-10-05 17:18:10 -07:00
Nicholas Nethercote
e6cc09cd51 Bug 1211324 (part 4) - Replace GraphicsFilter constants with gfx::Filter equivalents. r=mattwoodrow.
The conversion is as follows:

- GraphicsFilter::FILTER_NEAREST == gfx::Filter::POINT
- GraphicsFilter::FILTER_GOOD    == gfx::Filter::GOOD
- GraphicsFilter::FILTER_BEST    == gfx::Filter::LINEAR

Also typedef GraphicsFilter to gfx::Filter; this will be removed in the next
patch.

These changes mean ToFilter() and ThebesFilter() are no longer needed.
2015-10-05 17:12:46 -07:00
Nicholas Nethercote
4461b88439 Bug 1211324 (part 3) - Remove GraphicsFilter::FILTER_FAST and replace it with FILTER_BEST. r=mattwoodrow.
This may sound like an odd change but it's what the current code effectively
already does due to the way ToFilter() and ThebesFilter() are defined.
2015-10-05 16:59:32 -07:00
Carsten "Tomcat" Book
b9e5717f50 Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)
2015-10-07 12:13:45 +02:00
Wes Kocher
46d77c938b Backed out 7 changesets (bug 1194555) for xpcshell failures
Backed out changeset e77be333f4fb (bug 1194555)
Backed out changeset 11951462a37c (bug 1194555)
Backed out changeset 99b27aa952c5 (bug 1194555)
Backed out changeset 70a8ed3b6a45 (bug 1194555)
Backed out changeset 748bfebe81e7 (bug 1194555)
Backed out changeset cbaac05a2934 (bug 1194555)
Backed out changeset fcbfd1379fcd (bug 1194555)
2015-10-06 14:40:51 -07:00
Shu-yu Guo
b5f316de44 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
Eric Rahm
ceea29572f Bug 1194555 - Part 3: Remove |getReportsForThisProcess| from the nsIMemoryReporterManager interface. r=njn
|getReportsForThisProcess| differs from |getReports| in that it is limited to current process and is synchronous. When asynchronous memory reporters are added the function will no longer be able tobe synchronous. There isn't much utility in only measuring the current process, so we can remove the function and switch existing users to |getReports|.
2015-10-06 11:23:33 -07:00
Nicholas Nethercote
58b9dc1102 Bug 1204393 (part 2) - Add more testing of the ICON decoder. r=seth. 2015-10-05 14:29:11 -07:00
Nicholas Nethercote
ba0768489b Bug 1204393 (part 1) - Use StreamingLexer in the ICON decoder. r=seth.
* * *
Bug 1204393 (part 1b) - Address review comments.
2015-10-05 14:29:01 -07:00
Seth Fowler
88a49b8c51 Bug 1210553 - Remove the alternate flags arguments from SurfaceCache's Lookup functions. r=dholbert 2015-10-05 17:06:34 -07:00
Steve Singer
6ec1eb8af1 Bug 1207378 - Add FrameRect to non-skia version of BeginFrame. r=seth 2015-09-30 19:58:00 +02:00
Seth Fowler
62eb848418 Bug 1209705 - Propagate the DrawResult for temporary surfaces to the caller in ClippedImage. r=tn 2015-10-01 11:31:41 -07:00
Seth Fowler
ad2154e5da Bug 1118926 (Part 1) - Remove remnants of -moz-resolution in C++ code. r=tn 2015-09-30 17:00:52 -07:00
Steve Singer
0b048032c2 Bug 1208935 - Move Deinterlacer to a standalone file. r=seth 2015-09-28 20:40:00 +02:00
Carsten "Tomcat" Book
f86711d912 Backed out 1 changesets (bug 1160200) for causing R2 test failures
Backed out changeset b4f64c940524 (bug 1160200)
2015-09-29 11:48:53 +02:00
David Newton
8d3167cc60 Bug 1160200 - APNG can't be used with type switching. r=mcaceres, sr=jrmuizel 2015-09-25 11:36:00 +02:00
Timothy Nikkel
7d7daa15ba Bug 1194837. Don't use the inverse orientation matrix when computing the image space invalidate rect. r=seth
The orientation matrix converts from decoded image space to oriented image space. The invalidation rect is in decoded image space. So we need to use the orientation matrix to convert it to oriented image space, not it's inverse.
2015-09-26 01:26:18 -05:00
Carsten "Tomcat" Book
d4860186ab merge mozilla-inbound to mozilla-central a=merge 2015-09-28 14:13:24 +02:00
Nicholas Nethercote
bcd2fb7111 Bug 1208345 - Remove gfxContext::GraphicsOperator. r=jwatt.
Also...

- Rename various "operator" identifiers as "op" to match |CompositionOp|.

- Rename |nsBackgroundLayerState::mCompositingOp| as |mCompositionOp| to match
  |CompositionOp|.

- Remove some deprecated functions that are no longer needed.
2015-09-24 22:38:58 -07:00
Yoshi Huang
027c3bd555 Bug 1165466 - Fix up docshell and loadcontext inheriting code in nsIScriptSecurityManager. r=bholley 2015-09-23 16:10:21 +08:00
Seth Fowler
4d5134b00c Bug 1207378 (Part 2) - Use Downscaler to remove first-frame padding when downscaling GIFs. r=tn 2015-09-26 01:36:23 -07:00
Seth Fowler
fb3b8f24c7 Bug 1207378 (Part 1) - Add support for a frame rect to Downscaler. r=tn 2015-09-26 01:36:19 -07:00
Nicholas Nethercote
f7e8a9e813 Bug 1207741 - Remove gfxIntSize. r=nical.
gfxIntSize is just a typedef of gfx::IntSize, so this is very mechanical. The
only tricky part is deciding for each occurrence whether to replace it with
IntSize, gfx::IntSize or mozilla::gfx::IntSize; in all cases I went with the
shortest one that worked given the existing "using namespace" declarations.
2015-09-23 11:49:05 -07:00
Nathan Froyd
490e851ea9 Bug 1207245 - part 1 - move RefCounted<T> to its own file
Various bits depend on RefPtr.h to provide RefCounted<T> and RefPtr<T>.
It will be easier to manage an automatic conversion from RefPtr<T> to
nsRefPtr<T> if we split out the dependency on RefCounted<T> first.
2015-09-22 21:27:34 -04:00
Daniel Holbert
b15f8441aa Bug 1205923: Make VectorImage::GetWidth/GetHeight set outparam to 0 (not -1) on failure, to accomodate callers that don't check error codes. r=seth 2015-09-18 15:33:43 -07:00
Seth Fowler
3e1ce22151 Bug 1195878 - If we detect animation during a full decode, drop the results of the full decode on the floor. r=tn 2015-09-23 16:53:40 -07:00
Chris Peterson
dd2fcb9b7d Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Nathan Froyd
4a1659c5a9 Bug 1207183 - micro-optimize removing work items from DecodePool's queues; r=seth
We're transferring ownership out of the queue; there's no reason for us
to pay for an AddRef/Release pair here.
2015-09-22 19:15:12 -04:00
Carsten "Tomcat" Book
f8abba90f1 merge mozilla-inbound to mozilla-central a=merge 2015-09-22 12:35:13 +02:00
Seth Fowler
7183f9653b Bug 1206836 - When downscaling ICOs, downscale the AND mask as well. r=tn a=KWierso 2015-09-21 19:52:31 -07:00
Seth Fowler
0bbce2eb03 Bug 1146663 (Part 5) - Require that all image decoders support downscale-during-decode. r=tn 2015-09-19 16:21:08 -07:00
Seth Fowler
0501f72185 Bug 1146663 (Part 4) - Make all RasterImages support downscale-during-decode. r=tn 2015-09-19 16:21:05 -07:00
Seth Fowler
6e3870990e Bug 1146663 (Part 3) - Make it impossible to deoptimize imgFrames. r=tn 2015-09-19 16:21:02 -07:00
Seth Fowler
7eae9e022f Bug 1146663 (Part 2) - Remove the concept of lifetimes from the SurfaceCache. r=dholbert 2015-09-19 16:20:59 -07:00
Seth Fowler
40c407a01f Bug 1146663 (Part 1) - Remove HQ scaling, which is now dead code. r=tn 2015-09-19 16:20:56 -07:00
Seth Fowler
305c7e057b Bug 1191347 - Explicitly release surfaces on the main thread in TestDecodeToSurface. r=me 2015-09-19 15:47:36 -07:00
Seth Fowler
2ca93b2012 Bug 1201796 (Part 4) - Add downscale-during-decode support for the ICO decoder. r=tn 2015-09-19 13:34:14 -07:00
Seth Fowler
3c18be2def Bug 1201796 (Part 3) - Enable downscale-during-decode for imgITools::EncodeScaledImage(). r=tn 2015-09-19 13:34:12 -07:00
Seth Fowler
8abd0f3b26 Bug 1201796 (Part 2) - Add GetFrameAtSize() to support downscale-during-decode for GetFrame() use cases. r=tn 2015-09-19 13:34:09 -07:00
Seth Fowler
3a7ad009ae Bug 1201796 (Part 1) - Treat ICOs with wrong widths and heights as corrupt. r=tn 2015-09-19 13:34:06 -07:00
Christoph Kerschbaumer
1745603555 Bug 1048048 - add preload content policy types for images (r=seth) 2015-09-20 14:55:59 -07:00
Wes Kocher
9c40f87100 Backed out 7 changesets (bug 1048048) for android crashes in various chunks CLOSED TREE
Backed out changeset b5abe23a4ea5 (bug 1048048)
Backed out changeset 4f91b10e8be0 (bug 1048048)
Backed out changeset 450d4a13c90e (bug 1048048)
Backed out changeset 6a727c40eb68 (bug 1048048)
Backed out changeset 88c2333ff745 (bug 1048048)
Backed out changeset 740ab1ecd079 (bug 1048048)
Backed out changeset 02c6d6aef163 (bug 1048048)
2015-09-21 09:08:34 -07:00
Christoph Kerschbaumer
c533260e62 Bug 1048048 - add preload content policy types for images (r=seth) 2015-09-20 14:55:59 -07:00
Seth Fowler
7b3d492906 Bug 1196066 (Part 4) - Enable the ICOMultiChunk test, which now passes. r=tn 2015-09-18 23:12:32 -07:00
Seth Fowler
35fe3ce77c Bug 1196066 (Part 3) - Rewrite nsICODecoder to use StreamingLexer. r=tn 2015-09-18 23:12:30 -07:00
Seth Fowler
c64cb66f1f Bug 1196066 (Part 2) - Add a streaming lexing framework to ImageLib. r=tn 2015-09-18 23:12:27 -07:00
Seth Fowler
31e9b1d5ee Bug 1196066 (Part 1) - Fix bad directory entries in two of our ICO reftests. r=tn 2015-09-18 23:12:24 -07:00
Daniel Holbert
161cb21d25 backout 757560ab8de1 (bug 1205923) due to linux64 & winXP reftest failures 2015-09-18 18:57:38 -07:00
Daniel Holbert
5360001677 Bug 1205923: Make VectorImage::GetWidth/GetHeight leave outparam untouched on failure, to avoid returning -1 to callers that don't check error codes. r=seth 2015-09-18 15:33:43 -07:00
Wes Kocher
bb201c69bf Backed out 8 changesets (bug 1201796, bug 1196066) for mulet gij(28) failures CLOSED TREE
Backed out changeset 159d5d2946d3 (bug 1201796)
Backed out changeset 958988218976 (bug 1201796)
Backed out changeset 494e7553d641 (bug 1201796)
Backed out changeset d58149411b7d (bug 1201796)
Backed out changeset 35bd769b49f8 (bug 1196066)
Backed out changeset e4f3d4279b4c (bug 1196066)
Backed out changeset ca467297fa07 (bug 1196066)
Backed out changeset b4851ce6637d (bug 1196066)
2015-09-18 13:01:25 -07:00
Seth Fowler
687c6ed1b5 Bug 1201796 (Part 4) - Add downscale-during-decode support for the ICO decoder. r=tn 2015-09-18 10:54:40 -07:00
Seth Fowler
53d201df26 Bug 1201796 (Part 3) - Enable downscale-during-decode for imgITools::EncodeScaledImage(). r=tn 2015-09-18 10:54:38 -07:00
Seth Fowler
070157c0f4 Bug 1201796 (Part 2) - Add GetFrameAtSize() to support downscale-during-decode for GetFrame() use cases. r=tn 2015-09-18 10:54:35 -07:00
Seth Fowler
d919167ec8 Bug 1201796 (Part 1) - Treat ICOs with wrong widths and heights as corrupt. r=tn 2015-09-18 10:54:32 -07:00
Seth Fowler
382d1e6e99 Bug 1196066 (Part 4) - Enable the ICOMultiChunk test, which now passes. r=tn 2015-09-18 10:54:30 -07:00
Seth Fowler
9e36930eb8 Bug 1196066 (Part 3) - Rewrite nsICODecoder to use StreamingLexer. r=tn 2015-09-18 10:54:27 -07:00
Seth Fowler
c689ff08ee Bug 1196066 (Part 2) - Add a streaming lexing framework to ImageLib. r=tn 2015-09-18 10:54:24 -07:00
Seth Fowler
bb51dd275a Bug 1196066 (Part 1) - Fix bad directory entries in two of our ICO reftests. r=tn 2015-09-18 10:54:21 -07:00
Seth Fowler
dcfc39c17a Bug 1194058 (Part 2) - Add downscale-during-decode support for the GIF decoder. r=tn 2015-09-17 15:03:34 -07:00
Seth Fowler
c8ccf76b56 Bug 1194058 (Part 1) - Add Deinterlacer to allow Downscaler to work with interlaced images. r=tn 2015-09-17 15:03:31 -07:00
Nicholas Nethercote
cae6e9971a Bug 1203427 (part 1) - Add nsExpirationTracker::mName. r=froydnj.
There are many sub-classes of nsExpirationTracker. In order to distinguish them
nicely in the logging of timer firings, it's necessary to manually name each
one. (This wouldn't be necessary if there was a way to stringify template
parameters, but there isn't.)
2015-09-09 21:07:07 -07:00
Shu-yu Guo
45211869c8 Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Seth Fowler
481b667f27 Bug 1201763 - Add downscale-during-decode support for the ICON decoder. r=tn 2015-09-08 22:07:18 -07:00
Seth Fowler
e73e0b6f20 No bug - Fix out-of-date comment in Decoder.cpp. r=me 2015-09-08 22:07:15 -07:00
Seth Fowler
5f9f7767e7 Bug 1062066 (Part 4) - Add downscale-during-decode support for the BMP decoder. r=tn 2015-09-08 22:07:12 -07:00
Seth Fowler
47672d49c4 Bug 1062066 (Part 3) - Only mark BMP surfaces as transparent if they actually have alpha data. r=tn 2015-09-08 22:07:09 -07:00
Seth Fowler
f4a458b4ad Bug 1062066 (Part 2) - Add a Downscaler API to clear a row. r=tn 2015-09-08 22:07:06 -07:00
Seth Fowler
247b6ae54f Bug 1062066 (Part 1) - Add support for vertically flipping downscaler output. r=tn 2015-09-08 22:07:04 -07:00
Jeff Muizelaar
f2c966fa6f Bug 1180225. Make convolver more like upstream. r=seth
This fixes uninitialised reads.
2015-08-27 16:06:37 -04:00
Hiroyuki Ikezoe
f2fe9ec8b7 Bug 1151694 - Part 2 - imgTools should be inside mozilla::image namespace. r=bbirtles 2015-09-03 23:00:00 +02:00
Michael Layzell
7ccac39d33 Bug 1200413 - Part 2: Make lambdas in ProgressTracker.cpp capture strong references, r=seth 2015-09-01 18:20:48 -04:00
Seth Fowler
8240b88170 Bug 1060609 (Part 3) - Add tests that interlaced and non-interlaced PNGs have the same downscaling behavior. r=tn 2015-09-01 14:13:20 -07:00
Seth Fowler
f274dd5c30 Bug 1060609 (Part 2) - Add downscale-during-decode support for the PNG decoder. r=tn,f=glennrp 2015-09-01 14:13:17 -07:00
Seth Fowler
a48abe736b Bug 1060609 (Part 1) - Disable downscale-during-decode when HQ scaling is disabled. r=tn 2015-09-01 14:13:15 -07:00
Nicholas Nethercote
69d088e45f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
2015-08-27 20:44:53 -07:00
Ryan VanderMeulen
8f8d05680f Merge m-c to fx-team. a=merge 2015-08-26 14:34:15 -04:00
Gijs Kruitbosch
4b384a2add Bug 1173214, r=seth,bz 2015-08-26 10:24:04 +01:00
Seth Fowler
5a7a59bd7c Bug 1194900 - Stop deciding when to send invalidations in nsPNGDecoder and let Decoder handle it. r=tn 2015-08-24 19:49:36 -07:00
Seth Fowler
e0b216d11c Bug 1196476 - Replace ProgressTracker::FirstObserverIs() with a simpler mechanism on imgRequest. r=tn 2015-08-24 19:49:33 -07:00
Seth Fowler
23f493eff0 Bug 1194912 (Part 2) - Store ProgressTracker observers in a copy-on-write hash table, and dispatch notifications to them using a template. r=tn 2015-08-25 16:26:43 -07:00
Seth Fowler
ca5db71936 Bug 1194912 (Part 1) - Add CopyOnWrite<T> to support automatic copy-on-write for recursive writes to data structures. r=tn 2015-08-25 16:26:39 -07:00
Glenn Randers-Pehrson
a3dfa4ecc4 Bug 1187569 - PNGs getting stuck in a pixelated state. r=seth 2015-08-20 14:17:10 -07:00
Seth Fowler
59622789d0 Bug 1196065 - Add sanity tests for image decoders. r=tn 2015-08-19 14:04:01 -07:00
Justin Wood
e7b55fa917 Bug 1195499 - Adjust fuzz and skips for win10. r=Bas 2015-08-18 13:19:05 -04:00
Sebastian Hengst
8055f85934 Backed out changeset 3cafd6b3967b (bug 1196065) for OSX 10.7 static build failure. r=backout 2015-08-19 11:15:57 +02:00
Seth Fowler
5fcb7ff34d Bug 1196065 - Add sanity tests for image decoders. r=tn 2015-08-19 00:41:30 -07:00
Seth Fowler
aa26047103 Bug 1187401 (Part 3) - For consistency, call DoError if SetMetadata sees a negative size. r=tn 2015-08-18 10:19:28 -07:00
Seth Fowler
39bdedbc03 Bug 1187401 (Part 2) - Eliminate the nsresult return value from RasterImage::SetMetadata, since it's not used anymore. r=tn 2015-08-18 10:19:26 -07:00
Seth Fowler
ce0c257603 Bug 1187401 (Part 1) - Simplify the condition that determines whether we set RasterImage::mHasBeenDecoded. r=tn 2015-08-18 10:19:22 -07:00
Seth Fowler
6cfdfe6de8 Bug 1194906 - Replace 'NS_ENSURE_TRUE(BadImage(..))' warnings with more useful messages. r=tn 2015-08-18 10:19:18 -07:00
Seth Fowler
7aae5ba757 Bug 1194575 - Rename RecoverFromLossOfFrames() to RecoverFromInvalidFrames() to better reflect its role. r=tn 2015-08-18 10:19:14 -07:00
Michael Layzell
e7578d66be Bug 1195415 - Add asciiHostPort field to nsIURI, and use it in the implementation of nsPrincipal::GetOriginForURI, r=bholley 2015-08-18 14:52:24 -04:00
Nathan Froyd
5842130c5c Bug 968923 - part 5b - add nsIDOMWindowUtils::forceUseCounterFlush; r=bz
Use counter submission normally happens at document destruction.  For
testing use counters, however, we need to have use counters updated in
telemetry at deterministic points.  Therefore, we provide a method on
nsIDOMWindowUtils that forces use counters out to telemetry so we can
examine them.
2015-03-17 15:25:35 -04:00
Cameron McCormack
eee80f72f7 Bug 968923 - part 3b - propagating use counters from SVG images into owning/parent documents; r=seth 2015-06-03 13:42:07 -04:00
Cameron McCormack
09c01ab100 Bug 968923 - part 3a - add core DOM use counter functionality; r=smaug
This patch gives ns{I,}Document the ability to track use counters and
also to send those to telemetry at document destruction time.  We push
things to telemetry lazily because we're can't definitively say whether
something has been used until the document is torn down.
2015-06-03 12:39:18 -04:00
Seth Fowler
f3261cccb4 Bug 1185800 - Add DecoderFlags and SurfaceFlags enum classes and use them instead of imgIContainer flags in all decoder-related code. r=tn 2015-08-14 17:56:44 -07:00
Seth Fowler
3566f109af Bug 1194059 (Part 4) - Add tests that we detect IS_ANIMATED during the metadata decode. r=tn 2015-08-14 00:37:19 -07:00
Seth Fowler
5a1fea4fd4 Bug 1194059 (Part 3) - Ensure the nsIInputStream LoadImage() returns is always buffered. r=tn 2015-08-14 00:37:16 -07:00
Seth Fowler
4a88a2f80a Bug 1194059 (Part 2) - Always detect IS_ANIMATED during the metadata decode. r=tn 2015-08-14 00:37:13 -07:00
Seth Fowler
9d6cd4fe9b Bug 1194059 (Part 1) - Ensure that metadata decode progress is always delivered atomically. r=tn 2015-08-14 00:37:11 -07:00
Christoph Kerschbaumer
86bc7eb389 Bug 1193924 - Add assertion to AsyncOpen to make sure asyncOpen2() was called first when securityflags in loadInfo are set (r=sicking) 2015-08-12 21:36:33 -07:00
Seth Fowler
1197eb9502 Bug 1194557 - Ensure that if the image was locked before RecoverFromLossOfFrames() was called, it's still locked afterwards. r=tn 2015-08-13 20:39:54 -07:00
Ryan VanderMeulen
2d7a5a79d3 Backed out changeset f99b27e40987 (bug 1193924) for B2G emulator bustage.
CLOSED TREE
2015-08-13 12:45:05 -04:00
Christoph Kerschbaumer
447af75903 Bug 1193924 - Add assertion to AsyncOpen to make sure asyncOpen2() was called first when securityflags in loadInfo are set (r=sicking) 2015-08-12 21:36:33 -07:00
Seth Fowler
6a2b326a41 Bug 1191114 (Part 4) - Add tests for metadata decoding, including that we always deliver HAS_TRANSPARENCY during the metadata decode. r=tn 2015-08-12 10:41:11 -07:00
Seth Fowler
15e076ac81 Bug 1191114 (Part 3) - Add flags to image test cases. r=tn 2015-08-12 10:41:08 -07:00
Seth Fowler
dc9d155e39 Bug 1191114 (Part 2) - Add support for creating an anonymous metadata decoder, for use in tests. r=tn 2015-08-12 10:41:05 -07:00
Seth Fowler
2facec6512 Bug 1191114 (Part 1) - Always detect HAS_TRANSPARENCY during the metadata decode. r=tn 2015-08-12 10:41:02 -07:00
Seth Fowler
a7ab6ac01e Bug 1192356 (Part 2) - Take advantage of mozilla::Tie() in RasterImage.cpp. r=tn 2015-08-11 23:50:33 -07:00
Seth Fowler
bbb9ada747 Bug 1192356 (Part 1) - Take advantage of mozilla::Tie() in SurfaceCache.cpp. r=dholbert 2015-08-11 23:50:31 -07:00
Kyle Huey
0a62d4d460 Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Seth Fowler
527cba8957 Bug 1191090 - Use the normal PNG decoder for PNG metadata decodes. r=tn 2015-08-10 15:34:27 -07:00
Birunthan Mohanathas
e1f0334d06 Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
Christoph Kerschbaumer
5e2bd8d78a Bug 1127534 - Remove assertion before creating a channel (r=sicking) 2015-08-02 10:42:22 -07:00
Ehsan Akhgari
3ae1ec3884 Bug 1181863 - Part 4: Fix the build bustage 2015-08-01 00:07:04 -04:00
Seth Fowler
0102832838 Bug 1181863 (Part 3) - Add tests for DecodeToSurface(). r=tn 2015-07-31 18:10:34 -07:00
Seth Fowler
ddbf64e1fc Bug 1181863 (Part 2) - Add ImageOps::DecodeToSurface() to allow image decoding without involving any main-thread-only objects. r=tn 2015-07-31 18:10:31 -07:00
Seth Fowler
fc7b24b7b8 Bug 1181863 (Part 1) - Add support for reading from nsIInputStreams directly to SourceBuffer. r=tn 2015-07-31 18:10:29 -07:00
Seth Fowler
ed5f3b08de No bug - Remove obsolete comment in SourceBuffer.h. r=me 2015-07-31 18:10:26 -07:00
Seth Fowler
6cf8108408 Bug 1187546 - Make it possible to ask image decoders to only decode the first frame. r=tn 2015-07-31 18:10:23 -07:00
Seth Fowler
d7d368b6c9 Bug 1187386 (Part 7) - Eliminate remaining dependencies on a non-null mImage in Decoder. r=tn 2015-07-31 07:29:18 -07:00
Seth Fowler
5b920b75e5 Bug 1187386 (Part 6) - Merge Decoder::Finish() and RasterImage::OnDecodingComplete() into RasterImage::FinalizeDecoder(). r=tn 2015-07-31 07:29:15 -07:00
Seth Fowler
ace4842b4f Bug 1187386 (Part 5) - Merge Decoder::SetSizeOnImage() into ImageMetadata::SetOnImage(). r=tn 2015-07-31 07:29:12 -07:00
Seth Fowler
1b0b4a7c6a Bug 1187386 (Part 4) - Make imgFrame::SetOptimizable() callable from off-main-thread. r=tn 2015-07-31 07:29:10 -07:00
Seth Fowler
07437fd82e Bug 1187386 (Part 3) - Don't destroy Decoder::mImage if Decoder::mImage is null. r=tn 2015-07-31 07:29:07 -07:00
Seth Fowler
a1c94fd9c5 Bug 1187386 (Part 2) - Rework decoder code to avoid calling Decode::GetImage(). r=tn 2015-07-31 07:29:03 -07:00
Seth Fowler
d5de49efd5 Bug 1187386 (Part 1) - Make most decoder state private. r=tn 2015-07-31 07:29:00 -07:00
Seth Fowler
49c394e147 Bug 1189593 - Only use SSE2 in image::Downscaler if we're running on an SSE2-capable machine. r=tn 2015-07-30 19:48:22 -07:00
Lee Salzman
d7eac98ff6 Bug 1188462 - Fix inclusion of skia headers to use correct directory prefixes. r=jrmuizel 2015-07-29 16:31:40 -04:00
Lee Salzman
cf88f83a89 Bug 1188462 - Add SKIA_INCLUDES list for adding Skia to header search path. r=jrmuizel 2015-07-30 12:05:22 -04:00
Daniel Holbert
584b0b326c Bug 1188569: Drop unneeded MOZ_WARN_UNUSED_RESULT from from LookupBestMatch in SurfaceCache.cpp. r=seth 2015-07-30 12:35:19 -07:00
Nicholas Nethercote
242308999c Bug 1188745 - Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis(). r=froydnj.
This makes it clearer that, unlike how SizeOf*() functions usually work, this
doesn't measure any children hanging off the array.

And do likewise for nsTObserverArray.
2015-07-28 23:24:24 -07:00
Aidin Gharibnavaz
31046168cb Bug 108603 - Remove NS_IMPL_QUERY_INTERFACE_INHERITED0. r=mccr8, r=froydnj 2015-07-24 12:13:00 -04:00
Bobby Holley
59c4d9cf6c Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Nicholas Nethercote
3a84fe11ee Bug 1188705 (part 3) - Simplify imgFrame::SizeOfExcludingThis(). r=seth.
imgFrame::SizeOfExcludingThis() measures heap and non-heap memory in a very
complex way. This patch simplifies it and removes gfxMemoryLocation in the
process. (gfxMemoryLocation::OUT_OF_PROCESS was unused.)
2015-07-28 21:02:45 -07:00
Nicholas Nethercote
fc5b781b3f Bug 1188705 (part 2) - Remove unused SizeOfDecodedWithComputedFallbackIfHeap declaration. r=seth. 2015-07-28 18:58:57 -07:00
Wes Kocher
68b9154e3f Backed out changesets f6d75433812f,7864cbaa9e5d (bug 1173214) for reftest failures CLOSED TREE 2015-07-28 15:20:25 -07:00
Gijs Kruitbosch
1f2429ca3f Bug 1173214. Be a little more more careful with moz-icon URIs. r=bzbarsky 2015-07-16 15:24:51 +01:00
Seth Fowler
a0d4f607c9 Bug 1184996 (Part 4) - Forbid instantiation of decoders except via DecoderFactory. r=tn 2015-07-22 22:39:56 -07:00
Seth Fowler
ff2b61cc0f Bug 1184996 (Part 3) - Replace all remaining references to 'size decodes' with 'metadata decodes'. r=tn 2015-07-22 22:39:54 -07:00
Seth Fowler
23308ca239 Bug 1184996 (Part 2) - Clean up RasterImage's decoding API. r=tn 2015-07-22 22:39:51 -07:00
Seth Fowler
a0a0a54320 Bug 1184996 (Part 1) - Create decoders with a DecoderFactory. r=tn 2015-07-22 22:39:48 -07:00
Seth Fowler
af0e57e951 Bug 1186667 - Correctly report IMAGE_DECODE_COUNT and IMAGE_MAX_DECODE_COUNT telemetry for only non-size decodes. r=tn 2015-07-22 22:39:45 -07:00
Seth Fowler
4c7622aada Bug 1186112 - Get rid of the #define'd constants in BMPFileHeaders.h. r=tn 2015-07-22 15:49:49 -07:00
Seth Fowler
651173cae8 Bug 1185592 (Part 2) - Make RasterImage store the decoder type instead of the MIME type. r=baku 2015-07-21 09:42:30 -07:00
Seth Fowler
f06f83e48e Bug 1185592 (Part 1) - Remove obsolete logging macros. r=baku 2015-07-21 09:42:27 -07:00
Seth Fowler
11cf315caa Bug 1185582 - Back out bug 1171356, a hack to retry image decoding which is now useless. r=tn 2015-07-20 11:24:59 -07:00
Christoph Kerschbaumer
1ff6cfab7b Bug 1143922 - Add AsyncOpen2 to nsIChannel and perform security checks when opening a channel - channel changes (r=mcmanus,sicking) 2015-05-15 13:21:20 -07:00
Seth Fowler
0879a5b457 Bug 1176124 (Part 2) - Add placeholder support to the SurfaceCache so we can avoid launching redundant decoders. r=dholbert 2015-07-19 18:39:44 -07:00
Seth Fowler
be3426ecf0 Bug 1176124 (Part 1) - Add a MatchType enum to LookupResult to let Lookup*() return more detailed information. r=dholbert 2015-07-19 18:39:40 -07:00
Seth Fowler
25f92aa6d8 Bug 1184804 - Wait for DECODE_COMPLETE to be fired in browser_bug666317.js. r=tn 2015-07-16 20:32:24 -07:00
Christoph Kerschbaumer
1e0e3bd865 Bug 1183563 - Fix incorrect mixed content warning after internal redirects. r=tanvi, r=seth 2015-07-15 14:52:47 -07:00
Nicholas Nethercote
34ba31983e Bug 1182958 - Use nsTHashTable::Iterator in image/. r=seth. 2015-07-14 06:37:57 -07:00
Seth Fowler
c37bebaf90 Bug 1183852 - Only mark surfaces as used in the SurfaceCache if a caller requested exactly that surface. r=dholbert 2015-07-14 22:19:02 -07:00
Seth Fowler
4b3b001053 Bug 1183836 - Remove support for decode-on-draw-only. r=tn 2015-07-14 18:16:31 -07:00
Mihai Volmer
dab99435c8 Bug 1126330 - Remove the check for non-looping animations. r=seth 2015-07-13 19:53:27 -07:00
Birunthan Mohanathas
47ed3a3675 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Michael Layzell
7ad1a4131b Bug 1181323 - Move nsSVGRenderingObserver's isupports/refcounting decl to subclasses, since one subclass (nsSVGFilterReference) already has its own redundant copy of the decl. r=dholbert 2015-07-09 20:32:00 +02:00
Seth Fowler
5ed998f9ea Bug 1117607 - Make decoders responsible for their own frame allocations. r=tn 2015-07-10 19:26:15 -07:00
Seth Fowler
73fa4d67bf Bug 1182545 - Make browser_bug666317.js wait for the discard event instead of expecting it at a precise time. r=tn 2015-07-10 16:37:03 -07:00
Seth Fowler
fb2e37fd12 Bug 1182533 - Sync decode ico-bmp-corrupted images before loading them in the <img> element. r=tn 2015-07-10 16:36:56 -07:00
Geoff Brown
f8e98ea39a Bug 1026290 - Update mochitest-chrome manifests for android; r=jgriffin 2015-07-10 14:41:59 -06:00
Seth Fowler
8cfbba9a8c Bug 1181909 - Fix potential null dereference in NextPartObserver. r=tn 2015-07-09 09:21:22 -07:00
Seth Fowler
41514eb38a Bug 1180126 - Read content disposition regardless of content type in imgRequest::PrepareForNewPart. r=tn 2015-07-09 09:21:20 -07:00
Seth Fowler
dd41398c61 No bug - Tweak formatting of logging statement in imgRequest. r=me 2015-07-09 09:21:17 -07:00
Maksim Lebedev
fdd1266a91 Bug 1177323 - disable decode-only-on-draw preference. r=seth 2015-07-08 00:19:00 +02:00
Seth Fowler
295e380150 Bug 1180931 (Part 2) - Allow sync size decoding for transient (i.e. multipart) images. r=tn 2015-07-08 15:52:58 -07:00
Seth Fowler
6fe9e086fe Bug 1180931 (Part 1) - Allow sync size decoding for single core devices. r=tn 2015-07-08 15:52:51 -07:00
Michael Layzell
0d61e8f519 Bug 1181324 - Eliminate the duplicate mRefCnt member in MultipartImage. r=seth 2015-07-07 14:10:00 +02:00
Dragana Damjanovic
e3003eee82 Bug 905127 - Part 2 - remove unnecessary nsNetUtil.h includes r=jduell 2015-07-06 07:55:00 +02:00
Emanuel Hoogeveen
e1b03075a7 Bug 905127 - Part 1 - Make some functions from nsNetUtil not inline. r=jduell 2015-07-07 04:17:00 +02:00
Robert O'Callahan
1cdd000dd3 Bug 1143575. Let callers of ImageContainer::SetCurrentImages specify frame IDs. r=nical 2015-07-03 22:13:48 +12:00
Robert O'Callahan
e01b36d03d Bug 1143575. Pass a list of timestamped images to ImageContainer::SetCurrentImages. r=nical 2015-07-07 09:58:18 +12:00
Ehsan Akhgari
5bd32283c8 Bug 1180105 - Do not leak the SourceSurface returned from imgIContainer::GetFrame in BlockUntilDecodedAndFinishObserving; r=seth 2015-07-06 21:30:42 -04:00
Seth Fowler
a6509b47cc Bug 1177615 - Rip everything related to FLAG_DECODE_STARTED out of ImageLib. r=tn 2015-07-06 17:11:14 -07:00
Juan Gomez
01df2f691b Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Franziskus Kiefer
16c410b7a8 Bug 1166910 - Referrer attribute for img tag. r=ckerschb, r=hsivonen, r=bz 2015-06-05 15:25:24 -07:00
Seth Fowler
8408489fa0 Bug 1167557 - Crash when a null surface is passed to SurfaceCache::Insert. r=dholbert 2015-07-01 16:09:21 -07:00
Carsten "Tomcat" Book
29a854f0cd Backed out changeset f5f3827ffcf1 (bug 1166910) for bustage 2015-07-01 08:19:28 +02:00
Franziskus Kiefer
2e40f313d0 Bug 1166910 - referrer attribute for img tag. r=hsivonen 2015-06-05 15:25:24 -07:00
Seth Fowler
f18cc406a1 Bug 1139641 - Return more information from SurfaceCache::Lookup and SurfaceCache::LookupBestMatch. r=dholbert 2015-06-30 18:57:03 -07:00
Nathan Froyd
8780083336 Bug 1161627 - part 2 - machine-convert TemporaryRef<T> to already_AddRefed<T>; r=ehsan
This conversion was done with the script:

  find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl' | \
    egrep -v 'cairo-win32-refptr.h|RefPtr.h|TestRefPtr.cpp' | \
    xargs sed -i -e 's/mozilla::TemporaryRef</already_AddRefed</g' \
                 -e 's/TemporaryRef</already_AddRefed</g'

Manual fixups were performed in the following instances:

- We handled mfbt/RefPtr.h manually so as to not convert TemporaryRef itself
  into already_AddRefed.

- The following files had explicit Move() calls added to make up for the lack
  of a copy constructor on already_AddRefed:

  dom/base/ImageEncoder.cpp
  dom/media/MediaTaskQueue.{h,cpp}
  dom/media/webaudio/PannerNode.cpp

- A redundant overload for MediaTaskQueue::Dispatch was deleted.

- A few manual fixups were required in mfbt/tests/TestRefPtr.cpp.

- Comments, using declarations, and forward declarations relating to
  TemporaryRef in dom/canvas/ and gfx/layers/ were changed to refer to
  already_AddRefed.
2015-06-17 10:00:52 -04:00
Kartikaya Gupta
ab833ca4fc Bug 1178274 - Don't enable decode-only-on-draw if the APZ pref is true but e10s is disabled. r=dvander 2015-06-30 06:43:07 -04:00
Seth Fowler
1b44eac300 Bug 1163856 (Part 2) - Fix tests that depended on image load event timing. r=tn 2015-06-30 02:38:01 -07:00
Seth Fowler
6f23b8ee92 Bug 1163856 (Part 1) - Delay the image load event until the size decoder gets finalized. r=tn 2015-06-30 02:37:58 -07:00
Phil Ringnalda
bf15233770 Back out 2 changesets (bug 1163856) for Windows !mSyncLoad assertion failures
CLOSED TREE

Backed out changeset 62c1c616f21c (bug 1163856)
Backed out changeset 04239448fe0b (bug 1163856)
2015-06-25 19:57:00 -07:00
Seth Fowler
520cfef82a Bug 1163856 (Part 2) - Fix tests that depended on image load event timing. r=tn 2015-06-25 17:10:05 -07:00
Seth Fowler
2be19c16ee Bug 1163856 (Part 1) - Delay the image load event until the size decoder gets finalized. r=tn 2015-06-25 17:09:57 -07:00
Ryan VanderMeulen
e6131fc8b8 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez
2128198065 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-06-24 14:11:00 -04:00
Seth Fowler
671e27d2ee Bug 1166981 - Decode images in LIFO order. r=tn 2015-06-24 11:37:59 -07:00
Seth Fowler
6a25172f59 Bug 1174923 - Stop delaying the document load event until images are decoded. r=tn a=kwierso 2015-06-19 15:55:12 -07:00
Phil Ringnalda
8311ff50b5 Back out 3a06964c6a52 (bug 1174923) for box-decoration-break-first-letter.html failures 2015-06-18 22:04:12 -07:00
Seth Fowler
dd2ff9c7f6 Bug 1174923 - Stop delaying the document load event until images are decoded. r=tn 2015-06-18 16:12:10 -07:00