Commit Graph

390 Commits

Author SHA1 Message Date
Robert O'Callahan
59747de4ad Bug 772679. Handle frame with NS_HAS_CONTAINER_LAYER having no display items. r=tnikkel 2012-08-05 20:59:06 +12:00
Robert O'Callahan
078dd6ac15 Bug 772679. RestrictToLayerPixels needs to accurately convert between appunits scroll offsets and ThebesLayer pixel coordinates. r=tnikkel
Change GetThebesLayerResolutionForFrame to GetThebesLayerScaleForFrame,
which just returns a scale. Ensure that the scale is as accurate as possible
even if dedicated layers for scrolled content (or any layers at all) have not
been created yet, by taking into account transforms that have not yet
generated layers. This makes the decisions made by
nsGfxScrollFrameInner::ScrollToImpl independent of whether there is
currently an active layer for the scrolled content (or much more nearly so).
In nsGfxScrollFrameInner::ScrollToImpl, do not use the current internal
fractional offset of the ThebesLayer, which is in a mostly unrelated
coordinate space to our scroll positions. Instead, just try to make sure
that the previous and next scroll position differ by a whole number of
layer pixels.
2012-08-05 00:26:38 +12:00
Ms2ger
b549803df7 Back out bug 772679 for crashes. 2012-08-04 15:10:45 +02:00
Robert O'Callahan
a8cf24827e Bug 772679. RestrictToLayerPixels needs to accurately convert between appunits scroll offsets and ThebesLayer pixel coordinates. r=tnikkel
Change GetThebesLayerResolutionForFrame to GetThebesLayerScaleForFrame,
which just returns a scale. Ensure that the scale is as accurate as possible
even if dedicated layers for scrolled content (or any layers at all) have not
been created yet, by taking into account transforms that have not yet
generated layers. This makes the decisions made by
nsGfxScrollFrameInner::ScrollToImpl independent of whether there is
currently an active layer for the scrolled content (or much more nearly so).
In nsGfxScrollFrameInner::ScrollToImpl, do not use the current internal
fractional offset of the ThebesLayer, which is in a mostly unrelated
coordinate space to our scroll positions. Instead, just try to make sure
that the previous and next scroll position differ by a whole number of
layer pixels.
2012-08-05 00:26:38 +12:00
David Zbarsky
02175ccbab Bug 706179 Part 3: Turn on the use of scaling for layers in FrameLayerBuilder r=mattwoodrow 2012-08-03 14:29:22 -07:00
David Zbarsky
bde306fdca Bug 755084 Part 2: Perform CSS animations of transform and opacity on the compositor r=roc, dbaron 2012-07-31 10:28:21 -07:00
David Zbarsky
312c029975 Bug 706179 Part 2: Add a BaseTransform and scaling to layers, r=roc, cjones 2012-07-30 19:20:00 -07:00
Mark Finkle
a4d33f44cf Backout 169ff207ed19, a34baed70c1b, f9ccdd490bd7, 39550ed860e6, 2194a2dd66b2, 908eb2e26843, a76e0a267f26 due to mobile viewport bustage (bug 778580) 2012-07-30 14:36:12 -04:00
Aryeh Gregor
57c0ad57fb Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Nicolas Silva
8f06b10d98 Bug 773462 - Rename calls to ImageContainer::SetCurrentImage into ImageContainer::SetCurrentImageInTransaction when the method is used within a layer transaction. r=roc 2012-07-26 14:11:22 -04:00
David Zbarsky
8bda81abf5 Bug 706179 Part 2: Add a BaseTransform to layers r=roc 2012-07-27 13:23:45 -07:00
David Zbarsky
c76cb082e0 Bug 755084 Part 2: Perform CSS animations of transform and opacity on the compositor r=roc, dbaron 2012-07-27 13:23:44 -07:00
Ed Morley
0981437de6 Backout 1244b8a8e57a (bug 755084), 32d16d0f87c9 (bug 706179), 8548e016d4a9 (bug 768440), 697f5b87eae9 (bug 768440), 808fc2bd4e8c (bug 755084), 54b1484cd125 (bug 755084), 876726b632c0 (bug 706179) for xul android R3 failures 2012-07-25 16:37:04 +01:00
David Zbarsky
30025de69a Bug 706179 Part 2: Add a BaseTransform to layers to return the layer's transform without scaling applied r=roc 2012-07-25 01:48:10 -07:00
David Zbarsky
bb16aa6296 Bug 755084 Part 2: Perform CSS animations of transform and opacity on the compositor r=roc, dbaron 2012-07-25 01:48:09 -07:00
Matt Woodrow
7798b353c1 Bug 770096 - Prevent crashes when encountering an empty ThebesLayer. r=roc 2012-07-25 09:39:01 +12:00
Matt Brubeck
091f852d76 Back out f4f5189b1d0c, 3b4f0606c547, b8a5a1ab8a5f, 5078933d6954, 7e0260c45de9 (bug 768440, bug 755084, bug 706179) because of reftest failures 2012-07-23 20:25:51 -07:00
David Zbarsky
730141f891 Bug 755084 Part 2: Perform CSS animations of transform and opacity on the compositor r=roc, dbaron 2012-07-23 17:34:46 -07:00
Matt Woodrow
8ecc9d2eaf Bug 741682 - Flatten component alpha layers into their parent layer with BasicLayers. r=roc 2012-07-23 15:00:36 +12:00
Matt Woodrow
fba08bf999 Bug 741682 - Use nsRegion::ScaleToInsidePixels when computing opaque regions of layers. r=roc 2012-07-23 15:00:36 +12:00
Jonathan Watt
43a701ee65 Bug 775697 - Cancel layer transactions that haven't ended after nsDisplaySVGEffects::PaintAsLayer returns. r=roc. 2012-07-20 00:53:55 -04:00
Matt Woodrow
64a3aef505 Bug 773100 - Invalidate the frame bounds instead of deleting the frame property. r=roc 2012-07-18 14:56:42 -04:00
Ehsan Akhgari
b2f5ade590 Backout changeset f0be368bb172 (bug 773100) for broken builds across the board 2012-07-18 12:19:20 -04:00
Matt Woodrow
15320ad1ad Bug 773100 - Invalidate the frame bounds instead of deleting the frame property. r=roc 2012-07-16 22:28:44 -04:00
Matt Woodrow
a12f572f37 Bug 539356 - Part 7 - Store FrameLayerBuilder objects on the LayerManager instead of nsDisplayListBuilder. r=roc 2012-07-17 13:03:51 -04:00
Matt Woodrow
0794dcd107 Bug 539356 - Part 5 - Change SVG effects painting to use a LayerManager transaction. r=roc 2012-07-17 13:03:51 -04:00
Chris Lord
15c3324aa3 Bug 772079 - Fix ThebesLayerInvalidRegion being destroyed too soon. r=roc
A comment in ApplyThebesLayerInvalidation says that it preserves the content
of ThebesLayerInvalidRegion, in case there are multiple container layers for
the same frame. SetHasContainerLayer, however, immediately clears said property.

This was causing invalidations to be lost since Bug 758620 on fixed-position
elements, as they were being separated out onto their own layers but were still
merged in the root scroll layer. This is tracked in Bug 769541.

This fixes the problem by storing the new invalid region in DisplayItemDataEntry
and clearing/setting the ThebesLayerInvalidRegion property in the
UpdateDisplayItemData callback from FrameLayerBuilder::WillEndTransaction.
2012-07-14 08:49:05 +01:00
Benoit Girard
5d6dc74a0f Bug 771219 - Restore display items when drawing a thebes layer. r=roc 2012-07-06 13:57:47 -04:00
Ehsan Akhgari
7ca323fbe6 Backout changeset eea5704272d0 (bug 539356) because of performance and correctness regressions 2012-07-03 20:28:32 -04:00
Ehsan Akhgari
70f358a631 Backout changeset 60affaedccc3 (bug 539356) because of performance and correctness regressions 2012-07-03 20:26:55 -04:00
Ehsan Akhgari
514088f9e1 Backout changeset f83491fc735a (bug 539356) because of performance and correctness regressions 2012-07-03 20:25:37 -04:00
Ehsan Akhgari
6ef72aef93 Backout changeset f568fc280fb0 (bug 539356) because of performance and correctness regressions 2012-07-03 20:24:55 -04:00
Ehsan Akhgari
abc68780bc Backout changeset 90ab708bab8b (bug 539356) because of performance and correctness regressions 2012-07-03 20:19:49 -04:00
Ehsan Akhgari
ee77eaaad9 Backout changeset 65410094add4 (bug 539356) because of performance and correctness regressions 2012-07-03 20:19:18 -04:00
Ehsan Akhgari
032c183b13 Backout changeset ce5e9fefee19 (bug 539356) because of performance and correctness regressions 2012-07-03 20:18:34 -04:00
Ehsan Akhgari
388ec767e6 Backout changeset 0c75abcb72ff (bug 539356) because of performance and correctness regressions 2012-07-03 20:17:01 -04:00
Ehsan Akhgari
0ca08d6135 Backout changeset f7599b247eef (bug 539356) because of performance and correctness regressions 2012-07-03 20:10:16 -04:00
Ehsan Akhgari
023780edbe Backout changeset 6234134d4430 (bug 539356) because of performance and correctness regressions 2012-07-03 20:08:19 -04:00
Ehsan Akhgari
e556c0c5a0 Backout changeset 2cf9546ee691 (bug 770001) because DLBI is being backed out 2012-07-03 19:40:24 -04:00
Ehsan Akhgari
c7621e142e Backout changeset 4e29b12a5d25 (bug 770096) because DLBI is being backed out 2012-07-03 19:38:42 -04:00
Phil Ringnalda
0c72c07a23 Back out 921c2e13b45e (bug 770144) for reftest bustage 2012-07-02 21:04:38 -07:00
Matt Woodrow
cbb8788fca Bug 770144 - Restrict ThebesLayer invalidations to the visible region. r=roc 2012-07-03 14:26:45 +12:00
Matt Woodrow
7e473bc2d6 Bug 770096 - Prevent crashes when encountering an empty ThebesLayer. r=roc 2012-07-03 14:23:11 +12:00
Robert O'Callahan
1162a096a1 Bug 770001. When comparing clips, adjust for any change in the ThebesLayer coordinate system. When clips are different, try to accumulate differences intelligently, taking into account that changes in clips outside the bounds of the clipped display item don't matter. r=mattwoodrow
--HG--
extra : rebase_source : d958c629307045f2592ffe658cd1a2e608713cbd
2012-07-02 11:46:21 +12:00
Matt Woodrow
65ed2f2ee6 Bug 539356 - Part 28 - Cached nsDisplayBackground rasterizations with BasicLayers. r=roc 2012-06-30 15:06:14 +12:00
Matt Woodrow
df33b4b071 Bug 539356 - Part 25 - Invalidate display items that have a changed clip. r=roc 2012-06-30 15:06:13 +12:00
Matt Woodrow
b7ecd3eb49 Bug 539356 - Part 14 - Handle multiple widget layer managers retaining data for the same frame. r=roc 2012-06-30 15:06:12 +12:00
Matt Woodrow
574dba78d6 Bug 539356 - Part 12 - Remove unnecessary LayerManagerLayerBuilder indirection. r=roc 2012-06-30 15:06:12 +12:00
Matt Woodrow
56a4c51474 Bug 741682 - Disable component alpha layers with BasicLayers. r=roc 2012-06-30 15:06:12 +12:00
Matt Woodrow
ae6a4a79e6 Bug 739671 - Store optimized Color/ImageLayers on the ThebesLayers that they replace. r=roc 2012-06-30 15:06:12 +12:00
Matt Woodrow
1f0dbc7c74 Bug 539356 - Part 9 - Implement DLBI. r=roc,bz,jwatt 2012-06-30 15:06:11 +12:00
Matt Woodrow
d41fe1225c Bug 539356 - Revert changes made by bug 728983 2012-06-30 15:06:10 +12:00
Matt Woodrow
a571105c89 Bug 539356 - Part 7 - Store FrameLayerBuilder objects on the LayerManager instead of nsDisplayListBuilder. r=roc 2012-06-30 15:06:10 +12:00
Matt Woodrow
f535bd8833 Bug 539356 - Part 5 - Change SVG effects painting to use a LayerManager transaction. r=roc 2012-06-30 15:06:10 +12:00
Nicholas Cameron
26fadecba0 Bug 757346; mask image format stuff - use A8 textures (except DX10) and some small, misc fixes. r=roc 2012-06-26 14:43:31 +12:00
Nicholas Cameron
01224f6b7a Bug 757347; Add a shutdown hook and remove MaskImageFormat(). r=roc 2012-06-26 14:43:30 +12:00
Nicholas Cameron
6b5607e36f Bug 757347; changes to FrameLayerBuilder. r=roc 2012-06-26 14:43:30 +12:00
Nicholas Cameron
e6af467b3d Bug 757347; changes to mask layer user data. r=roc 2012-06-26 14:43:30 +12:00
Nicholas Cameron
2237afc914 Back out bug 757346
--HG--
extra : rebase_source : 8a07c2c56ca9dbc165012b679d421435cc886c2c
2012-06-26 10:54:05 +12:00
Nicholas Cameron
7914eb8944 Bug 757346; mask image format stuff - use A8 textures (except DX10) and some small, misc fixes. r=roc 2012-06-26 09:44:41 +12:00
Nicholas Cameron
3cd654450f Bug 757347; Add a shutdown hook and remove MaskImageFormat(). r=roc 2012-06-26 09:44:41 +12:00
Nicholas Cameron
abe8ccd904 Bug 757347; changes to FrameLayerBuilder. r=roc 2012-06-26 09:44:41 +12:00
Nicholas Cameron
aafc59666b Bug 757347; changes to mask layer user data. r=roc 2012-06-26 09:44:41 +12:00
Ryan VanderMeulen
b74e4a29db Revert c39d36167b99 due to a horribly munged backout. 2012-06-10 19:44:50 -04:00
Ryan VanderMeulen
061d4c2616 Backout the bug 754202 backout due to orange. 2012-06-10 19:37:47 -04:00
Nicholas Cameron
41314b89f2 Bug 755078 - Backout previously-landed patch for bug 755078. r=roc 2012-06-09 14:22:40 -04:00
Robert O'Callahan
a54ea3aa5f Bug 753329. Share ThebesLayerInvalidRegion for a given ContainerLayer across all the frames that are sharing that layer as their ContainerLayer. r=mattwoodrow
* * *
Bug 753329. Followup: put ThebesLayerInvalidRegionProperty in display-list-builder coordinates so it can be shared by frames with different coordinate systems. r=mattwoodrow
2012-06-07 22:07:32 +12:00
Nicholas Cameron
5731bf3be3 Bug 758561 - Don't build a mask for an empty layer. r=roc 2012-05-28 21:10:08 -04:00
Nicholas Cameron
eaca72e8fd Bug 757346 - Change from clipping the mask to drawing it. r=roc 2012-05-27 16:55:22 -04:00
Robert O'Callahan
ecbab2ff94 Bug 607417. Improve definition of the 'fixed layer' flag. r=tnikkel 2012-05-04 17:00:57 +12:00
Nicholas Cameron
a75759c60f Bug 753784; force mask layers to have a single tile - misc bits and pieces. r=roc 2012-05-17 10:30:10 +12:00
Nicholas Cameron
9be563af61 Bug 753784; add the ability to force a single tile. r=roc 2012-05-22 19:14:03 -04:00
Gervase Markham
87620f5676 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Nicholas Cameron
044718db79 Bug 755078 - Disable mask layers on Android. r=roc 2012-05-17 10:30:10 +12:00
Matt Woodrow
3c6ff5136f bug 750334 - rotating image appears too big during transition, then snaps to correct size r=roc
--HG--
extra : rebase_source : a8064d474693838e68f7b865f76043e1192a07a5
2012-05-15 10:31:39 +12:00
Nicholas Cameron
29f95ca6fd Bug 754488 - Fix warning in FrameLayerBuilder.cpp. r=dholbert 2012-05-14 19:01:05 -04:00
Robert O'Callahan
dca2ccff9c Bug 681192. Part 10: Control rounding direction of scaledOffset to try to make the residual be close to mActiveScrolledRootPosition. r=tnikkel
--HG--
extra : rebase_source : f27fb737f8956ed117df0be3a71da847cc2048c0
2012-05-10 17:24:20 +12:00
Robert O'Callahan
2c975e4eb4 Bug 681192. Part 0.3: Add FrameLayerBuilder::GetThebesLayerResolutionForFrame. r=mattwoodrow
--HG--
extra : rebase_source : eea4dee6d081de5c288e295f3549fc88b10e6c39
2012-05-10 17:24:18 +12:00
Robert O'Callahan
5d9d661ae9 Bug 681192. Part 0.2: Use FuzzyEqual to check whether we need to invalidate ThebesLayers when subpixel offsets have changed. r=mattwoodrow
--HG--
extra : rebase_source : d0f8464aea9a436214d394123b1399105ccd0f66
2012-05-10 17:24:18 +12:00
Ed Morley
01d2ddd5d5 Backout 5c35cd6f3ea4 & ba39b0822992 (bug 607417) for native Android R1 failures 2012-05-04 14:26:09 +01:00
Robert O'Callahan
8d789110c9 Bug 607417. Improve definition of the 'fixed layer' flag. r=tnikkel
--HG--
extra : rebase_source : f68d53736e65c21a30a6248abe6b2b9ec32cdb17
2012-05-04 17:00:57 +12:00
Robert O'Callahan
65e34332be backing out patches for bug 607417 due to build bustage 2012-05-04 17:29:05 +12:00
Robert O'Callahan
9367097525 Bug 607417. Improve definition of the 'fixed layer' flag. r=tnikkel 2012-05-04 17:00:57 +12:00
Andreas Gal
dceb01a952 Do image scaling on the GPU (bug 650988, r=roc,cjones). 2012-05-03 07:05:55 -07:00
Nicholas Cameron
5cc1397fe6 Bug 716439; load a mask texture in the OGL backend. r=BenWa 2012-03-19 09:08:49 +13:00
Nicholas Cameron
7d91b411ee Bug 716439; creating mask layers. r=roc 2012-02-08 11:27:44 +13:00
Nicholas Cameron
3256b79a37 Bug 716439; recycling mask layers. r=roc 2012-02-08 11:26:40 +13:00
Nicholas Cameron
5c54eddf89 Bug 716439; User data for mask layers. r=roc 2012-02-08 11:26:33 +13:00
Robert O'Callahan
cb8220ad18 Bug 749075. Part 2: Skip the guts of Accumulate if we're adding a display item in an area of the layer that's already opaque and visible. r=mattwoodrow
This patch moves some stuff that needs to be done for every item up to the front of the function, then checks to
see if the item is being added in an area that's already opaque and visible. If so (and assuming the
color-layer optimization has already been disabled), none of the rest of the method would do anything so we
can exit early. In particular we avoid calling IsUniform and GetOpaqueRegion on the item, and we also avoid
some expensive region manipulation.
2012-05-03 16:29:05 +12:00
Robert O'Callahan
3e0ac701ac Bug 749075. Part 1: Refactor the nsDisplayItem API for testing whether the item needs to be rendered to a transparent surface. r=mattwoodrow
Currently we return an extra out parameter on GetOpaqueRegion. This is ugly and it's also going to be inefficient
because in a followup patch I'm going to avoid calls to GetOpaqueRegion, but we still need to know whether the item
needs a transparent surface. So this patch removes that out parameter. Instead, we rely on the fact that only
Windows' glass-window-background display item needs to force a transparent surface, and there can only be one
of those per window. So we store a reference to it in the nsDisplayListBuilder if there is one, and then we can
efficiently tell if any leaf display item is the one that forces a transparent surface. For display items that
wrap a list, we continue to store whether they need to force a transparent surface in a boolean in the list.
2012-05-03 16:29:05 +12:00
Andreas Gal
ef9beb1ab9 Render active layers at full resolution and transform them on the GPU (bug 750006, r=roc). 2012-04-29 14:41:13 -07:00
Matt Woodrow
86a700a6ae Bug 747718 - Disable ColorLayer optimizations when we have rounded-rect clipping. r=roc 2012-04-27 12:24:53 +12:00
Jeff Muizelaar
4c6a9736de Bug 745864. Add SAMPLE_LABELs to layout code. r=roc, a=joe
--HG--
extra : rebase_source : d826780c34692d333442b6bf563791b53bf3aa3d
2012-04-16 14:37:59 -04:00
Robert O'Callahan
e1a9548573 Bug 728983. Part 2: When display items for multiple frames are merged, track the merged frames and mark them all as having an associated container layer. This ensures that invalidations are processed correctly. r=mattwoodrow 2012-04-17 17:45:04 +12:00
Robert O'Callahan
d97a81aaec Bug 744607. Intersect a display item's layer-pixels draw-rect with the snapped clip rect. r=tnikkel 2012-04-13 23:44:05 +12:00
Robert O'Callahan
833e8a244f Bug 733607. Restructure logic to compute snapped bounds of display items in layer coordinates. Moves responsibility for computing snapped bounds from within the display items to callers of GetBounds/GetOpaqueRegion. r=tnikkel
Previously we snapped the results of nsDisplayItem::GetBounds and
nsDisplayItem::GetOpaqueRegion internally. By tracking which display items were
inside transforms, we disabled snapping quite conservatively whenever an ancestor
had a transform, which is undesirable.

With this patch, we don't snap inside GetBounds or GetOpaqueRegion, but just return
a boolean flag indicating whether the item will draw with snapping or not. This flag
is conservative so that "true" means we will snap (if the graphics context has a transform
that allows snapping), but "false" means we might or might not snap (so it's always safe
to return false).

FrameLayerBuilder takes over responsibility for snapping item bounds. When it converts
display item bounds to layer pixel coordinates, it checks the snap flag returned from
the display item and checks whether the transform when we draw into the layer will be
a known scale (the ContainerParameters scale factors) plus integer translation. If both
are true, we snap the item bounds when converting to layer pixel coordinates. With
this approach, we can snap item bounds even when the items have ancestors with active
transforms.
2012-04-10 23:24:18 +12:00
Robert O'Callahan
dc8336f1e9 Bug 735141. Clear imageContainer to indicate that we're not using that optimization. r=tnikkel 2012-03-19 20:26:39 +13:00
Ali Juma
ebf4e4d87a Bug 725095 - Address Layout review comments. r=mats 2012-03-13 12:57:31 -04:00
Benoit Girard
18b1521f00 Restore merge changeset 39a3044823b0, regression fixed upstream in mc 2012-03-05 13:09:05 -05:00
Benoit Girard
b24e1949c2 Backed out changeset 39a3044823b0 because of bad interaction with maple. 2012-03-02 18:32:46 -05:00
Benoit Girard
77a9a7b782 Merge mc->Maple, resolved conflicts 2012-03-02 14:27:05 -05:00
Kartikaya Gupta
134e9fec76 Merge m-c 2012-02-27 15:06:35 -05:00
Doug Turner
0aea58f84d merge with mozilla-central: 2012-02-22 09:30:09 -08:00
Ed Morley
31a11aef7f Backout 5ba9a4f41128 (bug 724614) for OS X reftest failures
--HG--
rename : layout/reftests/transform-3d/scale3d-all-separate.html => layout/reftests/transform-3d/scale3d-2-ref.html
2012-02-21 13:53:11 +00:00
Robert O'Callahan
af1daebc09 Bug 727661. We should only optimize ThebesLayers to ColorLayers or ImageLayers for brand-new layers (ThebesLayers with no currently valid data). Otherwise we risk ColorLayers being a deoptimization if there is valid content in the layer that doesn't happen to be visible but might become visible later, or if the layer contents are only temporarily a solid color and will soon need a buffer again. r=tn 2012-02-16 17:17:20 +13:00
Benoit Girard
5ec8cb5563 Make OMTC changes not effect desktop 2012-02-13 17:17:12 -05:00
Aryeh Gregor
7c2685c0bc Bug 724614 - 3D scaling makes text blurry. r=mattw
--HG--
rename : layout/reftests/transform-3d/scale3d-2-ref.html => layout/reftests/transform-3d/scale3d-all-separate.html
2012-02-09 10:09:39 -05:00
Benoit Girard
b18a77e427 Merge viewport with tip 2012-02-08 20:42:17 -05:00
Patrick Walton
5ec20f37ac Temporary workaround for bug 681192 and bug 724786 (subpixel layer invalidation). Remove me later. 2012-02-07 22:21:38 -08:00
Matt Woodrow
6ec8203d33 Bug 700240 - Print display lists to a file. r=roc,bjacob 2012-03-01 21:26:09 +13:00
Robert O'Callahan
1f8d8e9fb6 Bug 721627. Don't return nsRefPtr/nsCOMPtr from nsDisplayImage methods. nsDisplayImage::GetImage is unused anyway. r=mats 2012-01-30 18:16:54 +13:00
Phil Ringnalda
f7620ea904 Back out eb80ab6ee07b (bug 721627) and 06d02e7132b2 (bug 721294) for orange and red 2012-01-27 20:31:29 -08:00
Robert O'Callahan
b8fdaacc86 Bug 721627. Don't return nsRefPtr/nsCOMPtr from nsDisplayImage methods. nsDisplayImage::GetImage is unused anyway. r=mats
--HG--
extra : rebase_source : 113647a8bf8101b7c4d7058bd205be734f38125d
2012-01-28 16:36:49 +13:00
Robert O'Callahan
1f5f8fa298 Bug 727661. We should only optimize ThebesLayers to ColorLayers or ImageLayers for brand-new layers (ThebesLayers with no currently valid data). Otherwise we risk ColorLayers being a deoptimization if there is valid content in the layer that doesn't happen to be visible but might become visible later, or if the layer contents are only temporarily a solid color and will soon need a buffer again. r=tn 2012-02-16 17:17:20 +13:00
Aryeh Gregor
caf16ab10a Bug 724614 - 3D scaling makes text blurry. r=mattw
--HG--
rename : layout/reftests/transform-3d/preserve3d-1a.html => layout/reftests/transform-3d/preserve3d-5a.html
rename : layout/reftests/transform-3d/scale3d-2-ref.html => layout/reftests/transform-3d/scale3d-all-separate.html
2012-02-23 13:03:27 -05:00
Bas Schouten
f41ddf02da Bug 715785: Make ImageContainers independent of LayerManagers. r=roc 2012-02-01 03:18:30 +01:00
Nicholas Cameron
c26c7a3e1c Bug 718521 - Fix bug clipping to rounded rectangles for multiple objects. r=roc 2012-01-20 09:21:41 +13:00
Robert O'Callahan
08a3cb7145 Bug 713523. Part 2: Add SimplifyOutward for mVisibleAboveRegion and mDrawAboveRegion to avoid performance sinkholes when many layers are above a single ThebesLayer. r=tn 2012-01-12 00:26:33 +13:00
Robert O'Callahan
853836ab04 Bug 713532. Part 1: Suppress subpixel antialising in retained layers with an ancestor which has a non-integer-translation transform. r=tn 2012-01-12 00:26:33 +13:00
Jeff Walden
f73124604d Bug 711799 - Add parentheses to a bunch of && expressions nested within || expressions. r=dholbert 2011-12-18 01:00:47 -05:00
Jeff Muizelaar
d812d1d6ce Bug 707800. Add more sampler labels. r=bgirard 2011-12-02 17:05:33 -05:00
Chris Lord
780954def6 Bug 706690 - CSS scaling is jagged while layers are active. r=roc
While layers are active, scale factors are normalized to a power of 2 to
reduce the number of resolution changes during animations. This patch disables
the normalization when the scale factor on the layer is unchanged, or when
the layer was previously unscaled.
2011-12-07 23:12:41 +00:00
Matt Woodrow
a289897b49 Bug 700240 - Make display list debugging independent of DEBUG. r=khuey,roc 2011-11-17 16:44:16 +13:00
Bas Schouten
4af6622af4 Bug 334411: Introduce flashing invalidates areas when paint flashing is enabled. r=roc 2011-11-15 04:59:03 +00:00
Matt Woodrow
7fbe271e00 Bug 695275 - Fix conversion of ThebesLayers to ImageLayers. r=roc 2011-10-26 16:24:58 +13:00
Matt Woodrow
4fec733686 Bug 695275 - Add CheckAndClearPaintedState to test painting. r=roc 2011-10-26 16:23:26 +13:00
Robert O'Callahan
eb8c89d6a0 Backed out changeset 9bbb30ec51f5 2011-10-26 15:55:51 +13:00
Robert O'Callahan
86c6d255ee Bug 678859. Don't create layers for content less than 16x16 pixels. r=tn 2011-10-26 14:14:49 +13:00
Ehsan Akhgari
2a602a5685 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Justin Lebar
bba1204f29 Bug 688619 - Make FrameLayerBuilder::DisplayItemEntry use an nsAutoTArray. r=roc
--HG--
extra : rebase_source : 7793ddde81ad25127a75fc8f2b9d67d454941b83
2011-10-06 17:35:08 -04:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Mats Palmgren
b94c2b063e Bug 684574 - InternalInvalidateThebesLayersInSubtree should recurse on the subdocument root frame. r=roc 2011-09-06 14:56:45 +02:00
Matt Woodrow
f9d4b0bc4e Bug 505115 - Part 15 - Add 4D Vectors, Quaternions and gfx3DMatrix functions. r=derf 2011-08-27 12:06:03 +12:00
Mats Palmgren
f06792a6ef Bug 653649 - New way of getting child lists from frames. (part 3/5) r=roc
Update GetAdditionalChildListName consumers to use the new
child list iterator instead.
2011-08-24 22:54:29 +02:00
Matt Woodrow
fd49690163 Bug 505115 - Part 8c - Use ray tracing to untransform 2d points on a 3d plane. r=roc 2011-08-03 15:04:21 +12:00
Robert O'Callahan
36d533de88 Bug 637852. Part 24: Fix scale/translate order in DrawThebesLayer. r=tnikkel 2011-06-23 00:11:28 +12:00
Robert O'Callahan
2c76301582 Bug 637852. Part 23: Fix incorrect call to 'abs'. r=tnikkel 2011-06-23 00:11:28 +12:00
Robert O'Callahan
432a81c01e Bug 637852. Part 22: Detect when the contents of a ThebesLayer have shifted by a subpixel amount and repaint the entire layer when that happens. r=tnikkel
This fixes artifacts when we're scrolling inside scaled content, and includes a test for that (which fails without
this code change).
2011-06-23 00:11:28 +12:00
Robert O'Callahan
779fca303f Bug 637852. Part 21: Skip invalidation if aRegionToInvalidateIsEmpty (note that ScaleRoundOut on an empty bounds rect can return a non-empty rect). r=tnikkel 2011-06-23 00:11:28 +12:00
Robert O'Callahan
0c48fabd49 Bug 637852. Part 18: Support computing the "residual transform" for a ThebesLayer --- the difference between its snapped transform and the ideal transform --- and use it to align ThebesLayer drawing for transforms that aren't changing. r=tnikkel
This fixes bug 637597 and probably other bugs.
2011-06-23 00:11:28 +12:00
Robert O'Callahan
59cfc47b23 Bug 637852. Part 17: Tighten up AreLayersMarkedActive so we track exactly what properties are changing. Also, clamp resolution to power-of-2 only if the frame's transform has a scale. r=tnikkel
This lets us avoid clamping the scale in more situations. We should only clamp the scale when we think
the scale is changing due to a changing transform --- the goal of clamping is to not have to redraw the content
too often when the content is zooming in or out.
2011-06-23 00:11:28 +12:00
Robert O'Callahan
8a76eeceb9 Bug 637852. Part 12: Dump layer trees and display lists to stdout instead of stderr so that they stay in order with window.dump() and other output. r=tnikkel 2011-06-23 00:11:28 +12:00
Robert O'Callahan
fcf2510a5d Bug 637852. Part 6: Implement resolution scaling in FrameLayerBuilder. r=tnikkel
FrameLayerBuilder::BuildContainerLayerFor takes responsibility for resolution scaling. The ContainerParameters
passed in are added to any transform requested. Then we extract the scale part of the transform, round the scale
up to the nearest power of two if the transform may be actively animated (so we don't have to redraw layer contents
constantly), pass that scale down to be applied by each child and set the residual transform on the ContainerLayer.

For child layers built via BuildLayer, we just pass the requested scale factor in via the ContainerParameters.
If the returned layer is a ContainerLayer then BuildLayer is guaranteed to have already done necessary scaling.
If the returned layer is not a ContainerLayer then we apply the scale ourselves by adding the scale to the
child layer's transform.

For child ThebesLayers containing non-layer display items, we scale the drawing of those display items so that
the child ThebesLayers are simply larger or smaller (larger or smaller visible regions).

We have to scale all visible rects, clip rects etc that are in the coordinates of ThebesLayers or the parent
ContainerLayer. To keep things simple we do this whenever we convert from appunits to integer layer coordinates.

When a ThebesLayer's resolution changes we need to rerender the whole thing.

nsDisplayList::PaintForFrame needs to respect the presshell's resolution setting. We do that by building a layer tree
with a ContainerParameters requesting a scale up by the presshell resolution; once that layer tree is built, we
adjust the root layer transform to scale back down by the resolution.
2011-06-23 00:11:27 +12:00
Robert O'Callahan
93793566d0 Bug 637852: Part 5: Create ContainerParameters structure to carry resolution scale factors through layer creation. r=tnikkel
This patch shouldn't change any behavior. It just passes the ContainerParameters around, which will contain scale factors that should have been
applied when BuildLayer returns a ContainerLayer.

This patch also adds an aTransform parameter to BuildContainerLayerFor, which nsDisplayTransform uses to set the
transform for the ContainerLayer. This way BuildContainerLayerFor knows what the container's transform is going to be
before constructing the children, which in the next patch will let us construct the children with the right resolution.
2011-06-23 00:11:27 +12:00
Benjamin Stover
a86e639dce Bug 655864 Password field is not masked immediately and shows artifacts, when typing past the end of the field r=roc 2011-05-18 15:54:31 -07:00
Robert O'Callahan
23bf97f80c Bug 657780. Silence pldhash warnings by shrinking ThebesLayerItemsEntry. r=tnikkel 2011-05-18 17:48:43 +12:00
Robert O'Callahan
ebb22db890 Bug 648483. Record the transform used when we last painted a layer and use that to control what needs to be invalidated in the layer. r=tnikkel 2011-05-17 11:05:56 +12:00
Zack Weinberg
647b7a0bfe Bug 651017, part 7: remove nsDeviceContext::CreateRenderingContextInstance and the CreateRenderingContext overload that takes a widget.
--HG--
rename : gfx/src/nsThebesDeviceContext.cpp => gfx/src/nsDeviceContext.cpp
rename : gfx/src/nsThebesDeviceContext.h => gfx/src/nsDeviceContext.h
extra : rebase_source : 6be7fe432488dcf2fb5b2faa0e178dccab480285
2011-04-16 21:08:22 -07:00
Robert O'Callahan
c957ae039e Bug 641426. Part 5: Avoid operator== where possible to distinguish between 'equal edges' and 'equal areas' for rectangles. r=dbaron,sr=cjones 2011-04-19 15:07:23 +12:00
Zack Weinberg
f5a0843ac7 Bug 266236 part 9: Move nsBoundingMetrics to its own header and prune inclusions of nsRenderingContext.h.
--HG--
rename : gfx/src/nsThebesRenderingContext.cpp => gfx/src/nsRenderingContext.cpp
rename : gfx/src/nsThebesRenderingContext.h => gfx/src/nsRenderingContext.h
extra : rebase_source : 92660748436f03475e011184e2828f1db0ad63e0
2011-04-07 18:04:40 -07:00
Jan Küchler
5ef6bf26cf Bug 266236 part 3: Mechanical rename of nsIRenderingContext and nsThebesRenderingContext to nsRenderingContext. Mechanical substitution of nsRefPtr<nsRenderingContext> for nsCOMPtr<nsRenderingContext>.
--HG--
rename : gfx/src/nsThebesRenderingContext.cpp => gfx/src/nsRenderingContext.cpp
extra : rebase_source : 34884bfcafd885feaf73300bc7246cd192062a48
2011-04-07 18:04:40 -07:00
Benjamin Stover
f31a56057f Bug 649583 Panning regression on google reader in 2011-04-12 nightly r=roc 2011-04-13 14:12:22 -07:00
Oleg Romashin
631800dfd2 Bug 607417 - Part1: position:fixed frames mark layers r=roc
--HG--
extra : rebase_source : dbbff8810bafd165a48c34924d98f5c87702ef3f
2011-04-05 23:00:25 -06:00
Robert O'Callahan
c6e4498a20 Bug 622072. Part 3: Support empty transactions for canvas layers. r=tnikkel
The basic idea is that whenever a layer transaction updates the window, we clear out the invalidation state for the canvas rendering context,
using a DidTransactionCallback registered on the layer(s) for the canvas, which calls MakeContextClean.

The DidTransactionCallbacks are directed to the user data attached to the Layer, which holds a strong reference to the canvas element. This
ensures that the element lives as long as the layer. Layers are destroyed when the presentation is torn down (including if the frame is destroyed),
so we can't have a leak here. The reference to the canvas element is only strong because the layer might briefly outlive the frame (the layer
won't be destroyed until the next paint of the window).

This patch moves responsibility for calling CanvasLayer::Updated and nsFrame::MarkLayersActive from the canvas context to nsHTMLCanvasElement::InvalidateFrame.
We call Updated on the retained CanvasLayer, if there is one; any other CanvasLayers created for this canvas would only be used once, and have Updated
called on them in BuildLayer when created.
2011-03-28 12:59:47 +13:00
Robert O'Callahan
d13eeaf01c Bug 641770. Apply correct clip rect to a layerized image. r=tnikkel 2011-04-01 10:33:46 +13:00
Ehsan Akhgari
931bd6ee19 Back out bug 622072 because it caused bug 645987 2011-03-29 14:31:53 -04:00
Robert O'Callahan
4ca813ae6e Bug 622072. Part 3: Support empty transactions for canvas layers. r=tnikkel
The basic idea is that whenever a layer transaction updates the window, we clear out the invalidation state for the canvas rendering context,
using a DidTransactionCallback registered on the layer(s) for the canvas, which calls MakeContextClean.

The DidTransactionCallbacks are directed to the user data attached to the Layer, which holds a strong reference to the canvas element. This
ensures that the element lives as long as the layer. Layers are destroyed when the presentation is torn down (including if the frame is destroyed),
so we can't have a leak here. The reference to the canvas element is only strong because the layer might briefly outlive the frame (the layer
won't be destroyed until the next paint of the window).

This patch moves responsibility for calling CanvasLayer::Updated and nsFrame::MarkLayersActive from the canvas context to nsHTMLCanvasElement::InvalidateFrame.
We call Updated on the retained CanvasLayer, if there is one; any other CanvasLayers created for this canvas would only be used once, and have Updated
called on them in BuildLayer when created.
2011-03-28 12:59:47 +13:00
Benjamin Stover
e9b77710b0 Bug 618975 Pan overflow elements in parent process r=cjones r=tn sr=roc a=blocking-fennec 2011-03-15 16:20:19 -07:00
Chris Jones
c1f6326631 Bug 637822: Translate invalidated content by the offset at which it was made valid. r=roc a=b 2011-03-11 01:58:29 -06:00
Doug Turner
eff01baa10 Backing out 99f6b3acc464 (bug 618975). Bug This caused a reftest crash. a=bustage 2011-03-08 22:02:50 -08:00
Benjamin Stover
6fd6388bc0 Bug 618975 Pan overflow elements in parent process r=cjones r=tn sr=roc a=blocking-fennec 2011-03-08 21:28:18 -08:00
Robert O'Callahan
20b9397753 Bug 630835. Make BuildLayer responsible for setting a visible region on the layer, and let FrameLayerBuilder only reduce it. r=tnikkel,a=blocking
This avoids problems with FrameLayerBuilder making the visible region bigger than we expected, invalidating CONTENT_OPAQUE flags set on the layer.
In particular, we had been using TransformBounds to compute the new visible region, and for non-axis-aligned transforms this gives us a visible
region which contains areas not actually painted by the layer contents.
2011-02-23 18:38:09 +13:00
Robert O'Callahan
f1081fb688 Bug 634232. Call WillEndTransaction/DidEndTransaction notifications for FrameLayerBuilder's temporary layer managers. r=tnikkel a=hardblocker 2011-02-20 19:28:00 -08:00
Robert O'Callahan
b9be837d8c Bug 622542. Remove unused FrameLayerBuilder::InvalidateAllThebesLayerContents API. r=tnikkel a2.0=blocking 2011-02-10 15:21:07 -08:00
Robert O'Callahan
9fa8b97779 Bug 625672. Part 2: Build temporary layer manager to render inactive layers after we've recomputed visibility. r=tnikkel,a=blocker 2011-02-10 21:58:11 +13:00
Robert O'Callahan
28603731b2 Bug 618722. background-attachment:fixed display items rendered via temporary layer managers can't have their scrolling taken care of via the layer system, so make sure we invalidate them when we scroll in their document. r=tnikkel,a=blocker 2011-02-10 21:58:11 +13:00
Timothy Nikkel
45e07ae313 Bug 628745. Replace rounded rect clips with their non-rounded cousins whenever possible. r=roc a=roc 2011-01-26 12:36:11 -06:00
Robert O'Callahan
409b6ce451 Bug 621601. Part 1: Change empty transaction API to EndEmptyTransaction. r=bas,tnikkel,a=joe 2011-01-19 21:27:54 +13:00
Matt Woodrow
f5f4d25848 Bug 586683 - Part 4 - Move images into a separate ImageLayer when they are the only item in a ThebesLayer. r=roc a=blocking2.0 2011-01-18 10:47:18 +13:00
Robert O'Callahan
52c00afd16 Bug 625288. Part 2: Report that -moz-win-glass and -moz-win-borderless-glass are uniform with opacity 0, i.e. they don't paint anything. Skip such display items when accumulating the visible region of a layer. r=tnikkel,a=blocking 2011-01-16 23:38:45 +13:00
Robert O'Callahan
a30256c652 Bug 615794. Part 1.5: Fix drawing of mForcedBackgroundColor to only fill the bounds of the visible region. r=tnikkel a=blocking
It's not correct to completely fill the destination context with the
mForcedBackgroundColor. FindOpaqueBackgroundColorFor only checks that
the bounds of the layer's visible region can be filled with the color.
Drawing outside the bounds of the visible region may not necessarily
be ignored (see comments on Layer::SetVisibleRegion).
2011-01-04 23:35:57 +13:00
Robert O'Callahan
88832278c6 Bug 615794. Part 1: Be conservative when converting visible regions and opaque regions from appunits to pixels. r=tnikkel a=blocking 2011-01-04 23:35:57 +13:00
Robert O'Callahan
e2ce233deb Bug 602757. Part 6: Don't limit complexity of opaque region when adding opaque chrome display items. r=tnikkel,a=blocking 2011-01-03 14:48:09 +13:00
Robert O'Callahan
d886269e1d Bug 602757. Part 5: Change HasText to GetComponentAlphaBounds. r=tnikkel,sr=dbaron,a=blocking 2011-01-03 14:48:09 +13:00
Robert O'Callahan
e946441ff1 Bug 602757. Part 3: Change IsOpaque to GetOpaqueRegion so we can get useful opaque regions for content that uses border-radius. r=tnikkel,sr=dbaron,a=blocking 2011-01-03 14:48:09 +13:00
Robert O'Callahan
face759151 Bug 602757. Part 2: Detect display items over the transparent part of a window, and disable usage of component alpha (i.e., subpixel antialiasing) for those items. r=tnikkel,a=blocking 2011-01-03 14:48:09 +13:00
Robert O'Callahan
8ad0efd198 Bug 612840. Part 4: Invert the meaning of CONTENT_NO_TEXT_OVER_TRANSPARENT and rename it. r=vlad 2010-12-20 14:26:14 +13:00
Robert O'Callahan
a946b15fb3 Bug 612840. Part 3: Make Layer::CONTENT_NO_TEXT_OVER_TRANSPARENT applicable to all layer types, and set CONTENT_NO_TEXT_OVER_TRANSPARENT on container layers. r=tnikkel,r=vlad 2010-12-20 14:26:14 +13:00
Robert O'Callahan
21068b15a9 Bug 612840. Part 1: Remove CONTENT_NO_TEXT flag since it's not really used. Also remove ShouldRetainTransparentSurface and related code; we'll assume that when text is over opaque pixels in an RGBA surface we can always paint it with subpixel AA --- and make it so in later patches. r=vlad 2010-12-20 14:26:13 +13:00
Bas Schouten
56250d8567 Bug 595277 - Part -1: Keep the reference to our LayerManager inside LayerManagerData. r=roc 2010-12-08 03:24:05 +01:00
Oleg Romashin
3874b00931 Bug 607653 - avoid temporary fbos/textures on transformed layers, when possible. part1 r=roc a=apporval2.0 2010-11-24 11:35:21 +02:00
Justin Lebar
43b18d2b18 Backed out changeset a5ec817740f0. a=orange 2010-11-29 09:08:24 -08:00
Oleg Romashin
233ef8a80c Bug 607653 - avoid temporary fbos/textures on transformed layers, when possible. r=roc a=approval2.0 2010-11-24 11:35:21 +02:00
Dave Townsend
1244f0ae62 Backing out changeset 8fff1c186b30 from bug 607653 due to reftest failures on OSX. a=bustage 2010-11-24 16:19:41 -08:00
Oleg Romashin
a8abb4a458 Bug 607653 - avoid temporary fbos/textures on transformed layers, when possible. r=roc a=approval2.0 2010-11-24 11:35:21 +02:00
Chris Jones
28d67e6217 Bug 550611: Make nsTArray optionally infallible. sr=bsmedberg a=blocking
--HG--
rename : xpcom/glue/nsTArray.cpp => xpcom/glue/nsTArray-inl.h
2010-11-08 20:48:59 -06:00
Felipe Gomes
c1ad5cb316 Bug 601603. Part 5 - Ensure that the layer that holds the window background is never opaque for glass windows. r=roc a=beta8 2010-10-19 15:02:25 -02:00
Matt Woodrow
47554e7736 Bug 594983. Look inside display sublists to determine whether there is text for the layer. r=roc,a=blocking 2010-10-11 13:58:20 +13:00
L. David Baron
96b0a79389 Bug 597676. If there's no rootPresContext, we should never detect DOM modification. Makes printing paint again. r=dbaron a=blocking2.0:beta7 2010-09-18 11:43:17 -07:00
Robert O'Callahan
c9fe10ac6d Bug 594774. Detect DOM changes during painting, and abort painting ASAP when that happens. r=dbaron a=blocking 2010-09-17 12:09:08 -07:00
Oleg Romashin
497f2db326 Merge with mozilla central 2779c55431a4, no conflicts 2010-09-10 22:32:25 -07:00
L. David Baron
a9d5fab154 Add a (wrapping) display item that clips its contents to the curvature of a border-radius. (Bug 459144, patch 13) r=roc a2.0=blocking2.0:beta6 2010-09-09 08:21:46 -07:00
Chris Jones
c3e279df85 Bug 590294, part 3: Keep ContainerLayer type info around in a few places. r=roc 2010-09-03 15:10:45 -05:00
Robert O'Callahan
bd90f73745 Bug 579276. Part 5: Set CONTENT_NO_TEXT and CONTENT_NO_TEXT_OVER_TRANSPARENT flags. r=tnikkel 2010-09-02 21:18:40 +12:00
Robert O'Callahan
0356f8659e Bug 579276. Part 3: Change Set/IsOpaqueContent API to a more generic Get/SetContentFlags API. r=cjones,sr=vlad 2010-09-02 21:18:40 +12:00
Robert O'Callahan
ad566be621 Bug 579276. Part 4: Move nsDisplayItem parameter down to ThebesLayerData::Accumulate. r=tnikkel 2010-09-02 21:18:39 +12:00
Robert O'Callahan
0f5f9e5391 Bug 579276. Part 2: If a transparent layer is over a solid background color, hoist that color into the layer to make it opaque. r=tnikkel 2010-09-02 21:18:39 +12:00
Robert O'Callahan
a150e0aa96 Bug 579276. Part 1: Change layer/layermanager user data API to use keys and values. r=cjones,sr=vlad 2010-09-02 21:18:39 +12:00
Mounir Lamouri
d01e645ef5 Bug 594109 - FrameLayerBuilder.cpp uses TYPE_MATHML_CHAR_FOREGROUND outside of #ifdef MOZ_MATHML. r=roc a=bustage 2010-09-08 19:44:47 +02:00
Robert O'Callahan
e31e06e790 Backing out bug 579276. a=me 2010-09-02 23:14:25 +12:00