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

111 Коммитов

Автор SHA1 Сообщение Дата
Justin Lebar 76d773f5f0 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 d2b70213ac 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 daf47bf09d Bug 684574 - InternalInvalidateThebesLayersInSubtree should recurse on the subdocument root frame. r=roc 2011-09-06 14:56:45 +02:00
Matt Woodrow 11c1aac810 Bug 505115 - Part 15 - Add 4D Vectors, Quaternions and gfx3DMatrix functions. r=derf 2011-08-27 12:06:03 +12:00
Mats Palmgren 2c56109b0d 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 d9e573335e 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 4bf1c2993b Bug 637852. Part 24: Fix scale/translate order in DrawThebesLayer. r=tnikkel 2011-06-23 00:11:28 +12:00
Robert O'Callahan 9d4ace85bf Bug 637852. Part 23: Fix incorrect call to 'abs'. r=tnikkel 2011-06-23 00:11:28 +12:00
Robert O'Callahan 6965db4c13 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 612c9f5ad3 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 9f092ece3e 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 50a8bdee8e 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 08cb8f63ce 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 9ddbfbb285 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 723e5c86ee 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 2d4a3eb67a 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 a3d1ab8a34 Bug 657780. Silence pldhash warnings by shrinking ThebesLayerItemsEntry. r=tnikkel 2011-05-18 17:48:43 +12:00
Robert O'Callahan ee46b56186 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 a8dd50e303 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 a7b4f1246b 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 1628ea1551 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 c510bc3046 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 5dbc4242ca Bug 649583 Panning regression on google reader in 2011-04-12 nightly r=roc 2011-04-13 14:12:22 -07:00
Oleg Romashin 863e12aca2 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 f55223784a 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 c54d24db4b Bug 641770. Apply correct clip rect to a layerized image. r=tnikkel 2011-04-01 10:33:46 +13:00
Ehsan Akhgari acac18d785 Back out bug 622072 because it caused bug 645987 2011-03-29 14:31:53 -04:00
Robert O'Callahan 46f6cf879d 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 9bb1728211 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 41902e0b90 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 2d4ad5ac6e Backing out 99f6b3acc464 (bug 618975). Bug This caused a reftest crash. a=bustage 2011-03-08 22:02:50 -08:00
Benjamin Stover 975ed8713b 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 6d646878f1 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 557afc8ade 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 2a4ecbd8d9 Bug 622542. Remove unused FrameLayerBuilder::InvalidateAllThebesLayerContents API. r=tnikkel a2.0=blocking 2011-02-10 15:21:07 -08:00
Robert O'Callahan 54035c1eda 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 04d3aa9c17 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 9faea4ebfa 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 63cc1f7d1a 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 0f65fdc7c4 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 a076eb9ea8 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 f50dfece5f 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 ee8f74d861 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 5dc51e4b4d 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 f38f22f331 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 a352316479 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 b81ded8225 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 c6700e764d 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 3259bd6e70 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 d8ccf4a713 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