Commit Graph

319 Commits

Author SHA1 Message Date
Matt Woodrow
f44f8caaf1 Bug 773100 - Invalidate the frame bounds instead of deleting the frame property. r=roc 2012-07-18 14:56:42 -04:00
Ehsan Akhgari
7099eb2ffc Backout changeset f0be368bb172 (bug 773100) for broken builds across the board 2012-07-18 12:19:20 -04:00
Matt Woodrow
61b2488959 Bug 773100 - Invalidate the frame bounds instead of deleting the frame property. r=roc 2012-07-16 22:28:44 -04:00
Matt Woodrow
55c47b5cde 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
7ff6103aa6 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
37292f8877 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
3009880b26 Bug 771219 - Restore display items when drawing a thebes layer. r=roc 2012-07-06 13:57:47 -04:00
Ehsan Akhgari
4644ee9d96 Backout changeset eea5704272d0 (bug 539356) because of performance and correctness regressions 2012-07-03 20:28:32 -04:00
Ehsan Akhgari
ebecf18be9 Backout changeset 60affaedccc3 (bug 539356) because of performance and correctness regressions 2012-07-03 20:26:55 -04:00
Ehsan Akhgari
85c54dc494 Backout changeset f83491fc735a (bug 539356) because of performance and correctness regressions 2012-07-03 20:25:37 -04:00
Ehsan Akhgari
5e6974df88 Backout changeset f568fc280fb0 (bug 539356) because of performance and correctness regressions 2012-07-03 20:24:55 -04:00
Ehsan Akhgari
ebb2d3223a Backout changeset 90ab708bab8b (bug 539356) because of performance and correctness regressions 2012-07-03 20:19:49 -04:00
Ehsan Akhgari
392100a449 Backout changeset 65410094add4 (bug 539356) because of performance and correctness regressions 2012-07-03 20:19:18 -04:00
Ehsan Akhgari
8f19fe7049 Backout changeset ce5e9fefee19 (bug 539356) because of performance and correctness regressions 2012-07-03 20:18:34 -04:00
Ehsan Akhgari
e217b72858 Backout changeset 0c75abcb72ff (bug 539356) because of performance and correctness regressions 2012-07-03 20:17:01 -04:00
Ehsan Akhgari
2edc2e9dbf Backout changeset f7599b247eef (bug 539356) because of performance and correctness regressions 2012-07-03 20:10:16 -04:00
Ehsan Akhgari
64c98e2147 Backout changeset 6234134d4430 (bug 539356) because of performance and correctness regressions 2012-07-03 20:08:19 -04:00
Ehsan Akhgari
4d2dc4e9a4 Backout changeset 2cf9546ee691 (bug 770001) because DLBI is being backed out 2012-07-03 19:40:24 -04:00
Ehsan Akhgari
66612fe60d Backout changeset 4e29b12a5d25 (bug 770096) because DLBI is being backed out 2012-07-03 19:38:42 -04:00
Phil Ringnalda
700c915a37 Back out 921c2e13b45e (bug 770144) for reftest bustage 2012-07-02 21:04:38 -07:00
Matt Woodrow
8662ef3442 Bug 770144 - Restrict ThebesLayer invalidations to the visible region. r=roc 2012-07-03 14:26:45 +12:00
Matt Woodrow
b14b46dec5 Bug 770096 - Prevent crashes when encountering an empty ThebesLayer. r=roc 2012-07-03 14:23:11 +12:00
Robert O'Callahan
e1af2fd5e7 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
660deac456 Bug 539356 - Part 28 - Cached nsDisplayBackground rasterizations with BasicLayers. r=roc 2012-06-30 15:06:14 +12:00
Matt Woodrow
67796cbb7d Bug 539356 - Part 25 - Invalidate display items that have a changed clip. r=roc 2012-06-30 15:06:13 +12:00
Matt Woodrow
ab51baf3ec 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
850cb83cd3 Bug 539356 - Part 12 - Remove unnecessary LayerManagerLayerBuilder indirection. r=roc 2012-06-30 15:06:12 +12:00
Matt Woodrow
ffcd727240 Bug 741682 - Disable component alpha layers with BasicLayers. r=roc 2012-06-30 15:06:12 +12:00
Matt Woodrow
4e803b179a Bug 739671 - Store optimized Color/ImageLayers on the ThebesLayers that they replace. r=roc 2012-06-30 15:06:12 +12:00
Matt Woodrow
cbd39105d9 Bug 539356 - Part 9 - Implement DLBI. r=roc,bz,jwatt 2012-06-30 15:06:11 +12:00
Matt Woodrow
557c514f1c Bug 539356 - Revert changes made by bug 728983 2012-06-30 15:06:10 +12:00
Matt Woodrow
a072bd4903 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
147e839dc3 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
03e8305815 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
34289b5948 Bug 757347; Add a shutdown hook and remove MaskImageFormat(). r=roc 2012-06-26 14:43:30 +12:00
Nicholas Cameron
dde00bf60b Bug 757347; changes to FrameLayerBuilder. r=roc 2012-06-26 14:43:30 +12:00
Nicholas Cameron
4a220c27be Bug 757347; changes to mask layer user data. r=roc 2012-06-26 14:43:30 +12:00
Nicholas Cameron
549b63d97d Back out bug 757346
--HG--
extra : rebase_source : 8a07c2c56ca9dbc165012b679d421435cc886c2c
2012-06-26 10:54:05 +12:00
Nicholas Cameron
aae4ecb5d0 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
f7821afd6f Bug 757347; Add a shutdown hook and remove MaskImageFormat(). r=roc 2012-06-26 09:44:41 +12:00
Nicholas Cameron
6f0ff4bb34 Bug 757347; changes to FrameLayerBuilder. r=roc 2012-06-26 09:44:41 +12:00
Nicholas Cameron
005c5ef480 Bug 757347; changes to mask layer user data. r=roc 2012-06-26 09:44:41 +12:00
Ryan VanderMeulen
891e38e528 Revert c39d36167b99 due to a horribly munged backout. 2012-06-10 19:44:50 -04:00
Ryan VanderMeulen
f497d31a0a Backout the bug 754202 backout due to orange. 2012-06-10 19:37:47 -04:00
Nicholas Cameron
a073280631 Bug 755078 - Backout previously-landed patch for bug 755078. r=roc 2012-06-09 14:22:40 -04:00
Robert O'Callahan
c94736b8a6 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
87a457843f Bug 758561 - Don't build a mask for an empty layer. r=roc 2012-05-28 21:10:08 -04:00
Nicholas Cameron
d2dd125d17 Bug 757346 - Change from clipping the mask to drawing it. r=roc 2012-05-27 16:55:22 -04:00
Robert O'Callahan
9d09bfe7c0 Bug 607417. Improve definition of the 'fixed layer' flag. r=tnikkel 2012-05-04 17:00:57 +12:00
Nicholas Cameron
8e7e5c8a18 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
ff3f144642 Bug 753784; add the ability to force a single tile. r=roc 2012-05-22 19:14:03 -04:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Nicholas Cameron
b9c7de3bfd Bug 755078 - Disable mask layers on Android. r=roc 2012-05-17 10:30:10 +12:00
Matt Woodrow
46963a8632 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
946c3ed9e9 Bug 754488 - Fix warning in FrameLayerBuilder.cpp. r=dholbert 2012-05-14 19:01:05 -04:00
Robert O'Callahan
b4c51b5b14 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
43cffcf97d 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
a86b9ab41d 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
87c7ae65b6 Backout 5c35cd6f3ea4 & ba39b0822992 (bug 607417) for native Android R1 failures 2012-05-04 14:26:09 +01:00
Robert O'Callahan
02b9f4cdf5 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
f1052e524a backing out patches for bug 607417 due to build bustage 2012-05-04 17:29:05 +12:00
Robert O'Callahan
2e766e37ce Bug 607417. Improve definition of the 'fixed layer' flag. r=tnikkel 2012-05-04 17:00:57 +12:00
Andreas Gal
6ced71cf11 Do image scaling on the GPU (bug 650988, r=roc,cjones). 2012-05-03 07:05:55 -07:00
Nicholas Cameron
925f7ef466 Bug 716439; load a mask texture in the OGL backend. r=BenWa 2012-03-19 09:08:49 +13:00
Nicholas Cameron
06d16ddac0 Bug 716439; creating mask layers. r=roc 2012-02-08 11:27:44 +13:00
Nicholas Cameron
30a8eb0b61 Bug 716439; recycling mask layers. r=roc 2012-02-08 11:26:40 +13:00
Nicholas Cameron
32f2aad481 Bug 716439; User data for mask layers. r=roc 2012-02-08 11:26:33 +13:00
Robert O'Callahan
12e3b37b2f 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
3e30bf4a46 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
0c2b4c6934 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
af34986dc9 Bug 747718 - Disable ColorLayer optimizations when we have rounded-rect clipping. r=roc 2012-04-27 12:24:53 +12:00
Jeff Muizelaar
de2c1757b4 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
7da215f576 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
d722131e30 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
d0dd680745 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
68c600d6f9 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
62fb2dc162 Bug 725095 - Address Layout review comments. r=mats 2012-03-13 12:57:31 -04:00
Benoit Girard
6345ad9c43 Restore merge changeset 39a3044823b0, regression fixed upstream in mc 2012-03-05 13:09:05 -05:00
Benoit Girard
02e577f6ff Backed out changeset 39a3044823b0 because of bad interaction with maple. 2012-03-02 18:32:46 -05:00
Benoit Girard
72da51e037 Merge mc->Maple, resolved conflicts 2012-03-02 14:27:05 -05:00
Kartikaya Gupta
bb76282045 Merge m-c 2012-02-27 15:06:35 -05:00
Doug Turner
476b362925 merge with mozilla-central: 2012-02-22 09:30:09 -08:00
Ed Morley
4616e748a8 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
d7e856edfc 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
41f6ac08c7 Make OMTC changes not effect desktop 2012-02-13 17:17:12 -05:00
Aryeh Gregor
dd0a23ced4 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
beb2ae7df8 Merge viewport with tip 2012-02-08 20:42:17 -05:00
Patrick Walton
727090523b Temporary workaround for bug 681192 and bug 724786 (subpixel layer invalidation). Remove me later. 2012-02-07 22:21:38 -08:00
Matt Woodrow
bf3005c3f4 Bug 700240 - Print display lists to a file. r=roc,bjacob 2012-03-01 21:26:09 +13:00
Robert O'Callahan
01d0e1b487 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
124120bf61 Back out eb80ab6ee07b (bug 721627) and 06d02e7132b2 (bug 721294) for orange and red 2012-01-27 20:31:29 -08:00
Robert O'Callahan
e7fe111cd2 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
d937a55cdf 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
567854dcfc 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
f987b74374 Bug 715785: Make ImageContainers independent of LayerManagers. r=roc 2012-02-01 03:18:30 +01:00
Nicholas Cameron
650a995230 Bug 718521 - Fix bug clipping to rounded rectangles for multiple objects. r=roc 2012-01-20 09:21:41 +13:00
Robert O'Callahan
33f12d88bb 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
31c1e64fa9 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
a0ca3d8af2 Bug 711799 - Add parentheses to a bunch of && expressions nested within || expressions. r=dholbert 2011-12-18 01:00:47 -05:00
Jeff Muizelaar
9c4d4fff06 Bug 707800. Add more sampler labels. r=bgirard 2011-12-02 17:05:33 -05:00
Chris Lord
454facc7e1 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
353e3c17e7 Bug 700240 - Make display list debugging independent of DEBUG. r=khuey,roc 2011-11-17 16:44:16 +13:00
Bas Schouten
1b8e035e99 Bug 334411: Introduce flashing invalidates areas when paint flashing is enabled. r=roc 2011-11-15 04:59:03 +00:00
Matt Woodrow
7968f3490d Bug 695275 - Fix conversion of ThebesLayers to ImageLayers. r=roc 2011-10-26 16:24:58 +13:00
Matt Woodrow
b18a7f9176 Bug 695275 - Add CheckAndClearPaintedState to test painting. r=roc 2011-10-26 16:23:26 +13:00
Robert O'Callahan
dc436c42a7 Backed out changeset 9bbb30ec51f5 2011-10-26 15:55:51 +13:00
Robert O'Callahan
33b94bdf8d 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