Commit Graph

2065 Commits

Author SHA1 Message Date
Timothy Nikkel
6c539ebfaa Bug 1263474. Convert three tests image/test/mochitest/chrome.ini to mochitest-plain. r=kats a=tests-only 2016-04-11 20:52:40 -05:00
Timothy Nikkel
94cc95e6ef Bug 1262269. Re-enable some imagelib tests that are passing. a=tests-only 2016-04-10 19:21:48 -05:00
Kartikaya Gupta
2305bb5e92 Bug 1261158 - Convert test_bug1132427.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: 4NXUjL4uGEP
2016-04-04 16:28:13 -04:00
Kartikaya Gupta
c592212066 Bug 1261158 - Convert test_xultree_animation.xhtml to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: BDanrpo7ES
2016-04-04 16:28:13 -04:00
Kartikaya Gupta
0a27a0fe8d Bug 1261158 - Convert test_synchronized_animation.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: LrftftKDGn6
2016-04-04 16:28:12 -04:00
Kartikaya Gupta
e5e598cc6f Bug 1261158 - Convert test_svg_filter_animation.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: K5ZxnkhR6nE
2016-04-04 16:28:12 -04:00
Kartikaya Gupta
945f295a3e Bug 1261158 - Convert test_svg_animatedGIF.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: IIJT4178POO
2016-04-04 16:28:12 -04:00
Kartikaya Gupta
53ca5bf31f Bug 1261158 - Convert test_staticClone.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: 8CUzA0EzM2G
2016-04-04 16:28:12 -04:00
Kartikaya Gupta
ff58440a32 Bug 1261158 - Convert test_removal_onload.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: DL4IQaUl7t5
2016-04-04 16:28:12 -04:00
Kartikaya Gupta
337156937e Bug 1261158 - Convert test_removal_ondecode.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: 6YOHnVhRqkY
2016-04-04 16:27:59 -04:00
Kartikaya Gupta
5fbb3592af Bug 1261158 - Convert test_net_failedtoprocess.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: HO1BMl760MQ
2016-04-04 16:27:58 -04:00
Kartikaya Gupta
75d0b207fd Bug 1261158 - Convert test_has_transparency.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: 9tR3LH4wg4U
2016-04-04 16:27:58 -04:00
Kartikaya Gupta
b0af8eec93 Bug 1261158 - Convert test_changeOfSource2.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: 9mdR16WzTkU
2016-04-04 16:27:58 -04:00
Kartikaya Gupta
5c3370d635 Bug 1261158 - Convert test_changeOfSource.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: BqYNvBW06ko
2016-04-04 16:27:58 -04:00
Kartikaya Gupta
99fd3d6f18 Bug 1261158 - Convert test_bullet_animation.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: 8kgi3p2DMkw
2016-04-04 16:27:58 -04:00
Kartikaya Gupta
8c7e85438a Bug 1261158 - Convert test_background_image_anim.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: 5RJwrm5RKiU
2016-04-04 16:27:58 -04:00
Kartikaya Gupta
5230acebee Bug 1261158 - Convert test_animSVGImage2.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: JT02zkq1JJm
2016-04-04 16:27:58 -04:00
Kartikaya Gupta
b071de6b2c Bug 1261158 - Convert test_animSVGImage.html to a mochitest-plain. r=tnikkel a=test-only
MozReview-Commit-ID: E2n2JM0PjzR
2016-04-04 16:27:57 -04:00
Seth Fowler
278aa793ba Bug 1225934 - Never allow surface substitution when FLAG_HIGH_QUALITY_SCALING is disabled. r=tn, a=ritu 2016-03-07 17:17:16 -08:00
Timothy Nikkel
4c706e5993 Bug 1253362. SVGDocumentWrapper::IsAnimated can be called after SVGDocumentWrapper::DestroyViewer so null check mViewer. r=dholbert
The testcase has an svg-as-image inside an svg-as-image. At shutdown the viewer of the inner svg-as-image is destroyed (via the shutdown observer) first. Then the outer svg-as-image destroys its viewer which tries to unregister all image requests from the refresh driver. So it unregisters the inner svg-as-image, which calls GetAnimated.
2016-03-06 14:59:19 -06:00
Timothy Nikkel
fde95fcc03 Bug 1251405. Part 2. Use 64 bit ints to hold the delay between the current time and the last animation time. r=edwin
When storing ms, 32 bit ints can hold 2^32/1000/60/60/24 ~= 49 days. It's quite conceivable that someone would leave a tab in the background for 50 days.
2016-03-04 21:54:03 -06:00
Timothy Nikkel
f0724d93e6 Bug 1251405. Part 1. Fix a significant signed/unsigned mismatch in handling the return value of FrameAnimator::GetSingleLoopTime. r=edwin
GetSingleLoopTime returns -1 on exceptional cases but we used an unsigned int to hold the return value in AdvanceFrame. So the |loopTime > 0| check would succeed. Fortunately the |delay.ToMilliseconds() > loopTime| check would fail because loopTime was MAX_UNIT32, so we didn't do anything incorrect.

http://hg.mozilla.org/mozilla-central/rev/263980931d1b (bug 890743) changed GetSingleLoopTime from returning 0 (and uint32_t) to -1 (and int32_t) on exceptional cases. But the caller of GetSingleLoopTime wasn't updated.
2016-03-04 21:54:00 -06:00
Matt Woodrow
13ac8417d3 Bug 1220082 - Assign frame ids to animated images so that they get invalidated correctly. r=seth 2016-01-12 17:14:09 +13:00
Sebastian Hengst
7ba929967a Backed out changeset a5d2e586777c (bug 1220082) for bustage. r=bustage on CLOSED TREE 2016-03-03 17:19:22 +01:00
Martijn Wargers
153c131077 Bug 1252444 - Rewrite some dom mochitests to use pushPrefEnv instead of setCharPref. r=jmaher 2016-03-03 09:41:14 -05:00
Matt Woodrow
0adea39e2b Bug 1220082 - Assign frame ids to animated images so that they get invalidated correctly. r=seth 2016-01-12 17:14:09 +13:00
Timothy Nikkel
803d464992 Bug 1251403. Determine the correct index of the next frame before getting the next frame. r=edwin
With the addition of the mDoneDecoding check to this code it is now safe to move it before the canDisplay check.
2016-03-02 21:52:36 -06:00
Jonathan Watt
6e065e1657 Bug 763784 - Make VectorImage::GetAnimated check for CSS animations. r=dholbert 2016-02-22 13:05:20 +00:00
Timothy Nikkel
b71974da3a Bug 926048. Part 4. Update the current animation frame time if we hit the end of decoded frames before all frames are decoded. r=edwin
Before the previous patch we would (wrongly) loop through the decoded frames even though we didn't have all of the frames of the animation. This had the beneficial side effect of advancing mCurrentAnimationFrameTime to aTime (the current time). With the previous patch we stop at the last decoded frame and don't advance mCurrentAnimationFrameTime, so it can lag behind. The problem with this is that when we have finished decoding we will then try to catch mCurrentAnimationFrameTime up, and this will jump us to a random point in the animation. So we need to advance mCurrentAnimationFrameTime ourselves.

If we were blocked on network/decoding then displaying the last available decoded frame is the correct frame to be displaying. So we are up to date. So we advance mCurrentAnimationFrameTime to the current time.
2016-03-01 22:34:40 -06:00
Timothy Nikkel
5624a569c7 Bug 926048. Part 3. Correctly check if we are at the end of an animated image. r=edwin
mImage->GetNumFrames() is the current number of decoded frames (that the RasterImage knows about), so it only represents the last frame of the animation if we are done decoding.

If we are not fully decoded, and we are on the last decoded frame, just stay on the last decoded frame. When more frames get decoded (or we determine that we are the last frame of the animation) we will advance.

One might expect that if |nextFrameIndex == mImage->GetNumFrames()| then |GetRawFrame(nextFrameIndex)| would return a null surface. But that is not the case because the decoding thread can insert frames into the surface cache that the RasterImage hasn't acknowledged yet (because it has to do so on the main thread, which we are currently running on).

This is why moving animated images to the surface cache is likely the cause of this bug.

This introduces an issue that is explained in, and fixed by the next patch.
2016-03-01 22:34:40 -06:00
Timothy Nikkel
6929f5ca0d Bug 926048. Part 2. Remove useless GetRawFrame call. r=edwin
|nextFrameIndex| is either |currentFrameIndex + 1| or 0, as can be seen from reading the code above this.

Also fix the whitespace on DoBlend call.
2016-03-01 22:34:39 -06:00
Timothy Nikkel
56eacd06a4 Bug 926048. Part 1. Simplify FrameAnimator::AdvanceFrame slightly. We don't need a |timeout| variable, we only check it once. r=edwin 2016-03-01 22:34:39 -06:00
Mike Taylor
67e3fade30 Bug 1249474. Part 2 - Update tests to handle new default image Accept header value. r=mcmanus 2016-02-29 14:52:12 -06:00
Timothy Nikkel
cf873fd10a Bug 1251091. Add crashtest. 2016-02-29 12:20:50 -06:00
Timothy Nikkel
01f0934130 Bug 1251091. Fix surface key comparison in ImageSurfaceCache::LookupBestMatch. r=dholbert
http://hg.mozilla.org/mozilla-central/rev/411f18fdffeb (bug 1186796) had a mistake in it.

It changed ImageSurfaceCache::LookupBestMatch to use a for loop instead of using a callback to iterate each entry of the hashtable. The callback was called with the surface key of its entry, and it used the name |aSurfaceKey| for that key. ImageSurfaceCache::LookupBestMatch uses the name |aSurfaceKey| for the key we are looking for. So when the code from the callback was moved into the for loop in ImageSurfaceCache::LookupBestMatch the meaning of |aSurfaceKey| changed, but the code was not updated.
2016-02-29 12:20:50 -06:00
Seth Fowler
bd7203ae49 Bug 1251808 - Construct the SourceSurfaceImage with the correct size in RasterImage::GetCurrentImage(). r=seth 2016-02-26 21:01:50 -08:00
Seth Fowler
1276556d86 Bug 1250648 - Clean up the style of for loops in TestStreamingLexer. r=njn 2016-02-26 21:01:49 -08:00
Timothy Nikkel
07274faf88 Bug 1249576. Add crashtest. 2016-02-26 17:14:32 -06:00
Timothy Nikkel
4932973dce Bug 1251742. Avoid overflow in computing area of surface sizes in SurfaceCache. r=dholbert
http://hg.mozilla.org/mozilla-central/rev/9727cdebb2ee (bug 1228314) fixed the first instance of this, but missed the next two for some reason.
2016-02-26 17:13:59 -06:00
Bogdan Postelnicu
91b8c4ed3b Bug 1228314 - added static_cast<int64> in order to avoid overflow. r=seth
MozReview-Commit-ID: KY3qpIlzE5K
2016-01-18 17:23:23 +02:00
Seth Fowler
7b188e94c9 Bug 1246851 (Part 4) - Add a test suite for SurfacePipes and SurfaceFilters. r=njn 2016-02-25 16:21:29 -08:00
Seth Fowler
db19165d58 Bug 1246851 (Part 3) - Add a factory for constructing SurfacePipes. r=njn 2016-02-25 16:21:29 -08:00
Seth Fowler
9ad1f2cd59 Bug 1246851 (Part 2) - Add SurfaceFilter implementations for basic surface output operations. r=njn 2016-02-25 16:21:29 -08:00
Seth Fowler
b7c8493982 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
Timothy Nikkel
d4dd09b6f4 Bug 1249576 - If the first frame of an APNG doesn't cover the whole image mark the image as transparent. r=edwin
In (non-animated) PNGs the image data is contained in IDAT chunks. In APNGs there are IDAT chunks, which contain the default image, and fDAT chunks, which contain frames of the animation. The default image is sometimes part of the animation (as the first frame), and sometimes not (displayed only by non-APNG aware viewers).

The default image must have the same size as in the PNG header chunk. But the fDAT images can be any (smaller) size. So the first frame of a PNG is allowed to be smaller than the whole image size so long as we are in an APNG and the first frame is from an fDAT chunk, not an IDAT chunk.

We post transparency if we encounter this case because we don't draw into those pixels on at least the first frame.
2016-02-23 20:22:00 +01:00
Timothy Nikkel
ac5b4e6021 Bug 1120141. Don't use surface with alpha for first frames of all pngs. r=edwin
It was a hack, not needed anymore.
2016-02-24 09:56:03 -06:00
Nicholas Nethercote
498dfa5d63 Bug 1249550 (part 2) - Add a test. r=tn. 2016-02-23 10:58:05 +11:00
Nicholas Nethercote
0494c4820e Bug 1249550 (part 1) - Flip BMPs with negative height when downscaling. r=tn. 2016-02-22 13:38:58 +11:00
Mason Chang
bc1757fb85 Bug 1246213 - Skia reftest fuzzing for Skia content on OS X. r=jmuizelaar 2016-02-16 09:07:52 -08:00
Timothy Nikkel
c815fb7027 Bug 1242093 - Fix assertion in Downscaler::ClearRow. r=njn
The starting column can be the last column, and we handle that correctly.

Also split function into ClearRow and ClearRestOfRow.
2016-02-16 08:04:57 +01:00