Old versions of llvmpipe (8.0.4) seem to give out 565 configs that it can't
actually make PBuffers for. Explicilty ask for 8,8,8 to avoid that problem.
Old versions of llvmpipe (8.0.4) seem to give out 565 configs that it can't
actually make PBuffers for. Explicilty ask for 8,8,8 to avoid that problem.
--HG--
extra : rebase_source : 2a667cc002b5ff4ad279e9483701eaf7952aeda8
Make sure the frame resolution of tiled buffers isn't discarded when they're
sent from client-side to host-side. This fixes drawing of low precision tiles
when the zoom has changed since they were last drawn.
Add a size hint parameter to CreateTextureClientForDrawing, and use said
parameter to not create Gralloc surfaces that are bigger than the maximum
texture size.
This isn't technically correct because these functions will never call
functions that throw exceptions, however it lets the profiler unwind them.
The unwinding will also probably be wrong during prologue/epilogue. The right
solution is probably to use cfi.
In order to make test behavior better match real-world sampling behavior, this
patch updates the test code in CompositorParent so that it only updates the
layer when a composite is scheduled. This enables creating mochitests that
reproduce bugs observed in regular usage.
PLayerTransaction.GetTransform doesn't actually return the same kind of value
when the transform on the layer is not set by animation. This is because it uses
information stored with the animation to undo various transforms. We shouldn't
pretend to return something useful/similar when we don't have that information
available.
This patch renames GetTransform to GetAnimationTransform and makes it return
a union that has type void_t if the layer is not transformed by animation.
LayerTransactionParent::RecvGetTransform takes care to reverse all the
transformations applied by AsyncCompositionManager::SampleValue to the CSS
values calculated so that it can return CSS values for testing. However, it
fails to revert the conversion from CSS pixels to device pixels applied to the
translation components of the transform by
nsStyleTransformMatrix::ProcessTranslatePart as called by
nsDisplayTransform::GetResultingTransformMatrix.
This patch converts the resulting transform's translation components from device
pixels back to CSS pixels. It also adds documentation for the other operations
in LayerTransactionParent::RecvGetTransform.
http://hg.mozilla.org/users/bschouten_mozilla.com/tiling/summary
This work is mainly porting tiled layers to new textures, implementing
double-buffered tiles and implementing a texture client pool, to be used by
tiled content clients.
Any questions regarding this patch should go to:
Bas Schouten <bschouten@mozilla.com>
Chris Lord <clord@mozilla.com>
Nicolas Silva <nsilva@mozilla.com>
In their absence questions can be directed to:
Jeff Muizelaar <jmuizelaar@mozilla.com>
Benoit Girard <bgirard@mozilla.com>
If a generated displayport expands beyond the scrollable rect on one axis,
redistribute that extra area to the other axis. Enabled by pref
apz.enlarge_displayport_when_clipped.
* * *
[ft] Fix resizing of bitmap fonts
From b94a519aad3d5b50aa6de47ee16ee6a099de9791 Mon Sep 17 00:00:00 2001
Say, you were asking cairo for a font at 200px. For bitmap-only fonts,
cairo was finding the closes strike size and using it. If the strike
was at 20px, well, that's what you were getting. We now scale that 20px
strike by a factor of 10 to get the correct size rendering.
Note that by itself this patch doesn't change much on the Linux desktop.
The reason is that the size you are interested in (eg. 200px) is lost by
fontconfig. When you request a font at 200px, fontconfig returns a font
pattern that says 20px, and so the next layers thing you want a font at
20px. To address that, one also needs a piece of fontconfig config that
puts the 200 back into the pixelsize. Something like this:
<match target="font">
<test name="scalable" mode="eq">
<bool>false</bool>
</test>
<edit name="pixelsize" mode="assign">
<times>
<name>size</name>
<name>dpi</name>
<double>0.0138888888888</double> <!--1/72.-->
</times>
</edit>
</match>
I'm going to try to upstream this config so it will be enabled by
default. The config can be a bit smarter. For example, if
metricshinting is enabled and the size difference is small, we may as
well not scale.
The nice thing about this is that the configuration of whether and when
to scale bitmaps will be done in fontconfig, not cairo / Qt / ... code.
---
* * *
[FT] Prefer downscaling bitmap glyphs to upscaling
From a8f1b456db744e33a10b2301df03528787e5b1ca Mon Sep 17 00:00:00 2001
Say, you have bitmap strikes for sizes 50ppem and 100ppem.
To render at 60ppem, it's much better to downscale the 100ppem
bitmap than upscale 50ppem one. Prefer downscaling.
---
* * *
[ft] I meant fabs(), not abs()
From 13bd8d09b44e50649f6fc4d58d036bc32c1d5c5b Mon Sep 17 00:00:00 2001
---
* * *
[ft] Fix memory bug in copying bitmaps
From a0f556f37fb7016aa304b7cf0e811c0d38f0b969 Mon Sep 17 00:00:00 2001
---
* * *
[ft] Fix wrong assumptions
From e738079302a968b7b1fb9101cd4d92a8887bedce Mon Sep 17 00:00:00 2001
If subpixel rendering is enabled, but FT returns a 8bit gray bitmap
(perhaps because the font has 8bit embedded bitmaps) we were hitting
the assertions because the assumptions made were wrong. Fix up.
---
* * *
Towards support loading color glyphs from FreeType
From 2cc353c3dbe01b4d8f65d6de800f2b1d6004a1c2 Mon Sep 17 00:00:00 2001
See comments.
---
* * *
Support 2bit and 4bit embedded bitmaps
From 9444ef09ccde2735258cc1bd2f1912119a32dd88 Mon Sep 17 00:00:00 2001
---
* * *
[ft] Fix math
From 7d26341072b13a78d4b3fe58779057ac020be487 Mon Sep 17 00:00:00 2001
---
* * *
[ft] Add missing include
From 0554d76402321b25cc952180e4d19436a9038d1a Mon Sep 17 00:00:00 2001
---
* * *
[ft] Fix alignment
From 34a747e7bdeba1cfe17318f80fbe6720d47bc023 Mon Sep 17 00:00:00 2001
---
* * *
[ft] Ensure alignment of bitmaps received from FreeType
From 46d9db96d460fea72f0420102e8a90c6a7231f79 Mon Sep 17 00:00:00 2001
---
When restoring the refresh driver after testing we can arrive at a situation
where a layer has an animation that has yet to start. However, calling
ElementAnimations::GetPositionInIteration with a negative value from the
compositor thread is an error.
This patch detects animations on the compositor thread that are yet-to-start and
skips them when sampling. It also moves the activeAnimations = true line up as
otherwise we would need special logic to wake up the compositor after the delay
has finished.
* * *
[ft] Fix resizing of bitmap fonts
From b94a519aad3d5b50aa6de47ee16ee6a099de9791 Mon Sep 17 00:00:00 2001
Say, you were asking cairo for a font at 200px. For bitmap-only fonts,
cairo was finding the closes strike size and using it. If the strike
was at 20px, well, that's what you were getting. We now scale that 20px
strike by a factor of 10 to get the correct size rendering.
Note that by itself this patch doesn't change much on the Linux desktop.
The reason is that the size you are interested in (eg. 200px) is lost by
fontconfig. When you request a font at 200px, fontconfig returns a font
pattern that says 20px, and so the next layers thing you want a font at
20px. To address that, one also needs a piece of fontconfig config that
puts the 200 back into the pixelsize. Something like this:
<match target="font">
<test name="scalable" mode="eq">
<bool>false</bool>
</test>
<edit name="pixelsize" mode="assign">
<times>
<name>size</name>
<name>dpi</name>
<double>0.0138888888888</double> <!--1/72.-->
</times>
</edit>
</match>
I'm going to try to upstream this config so it will be enabled by
default. The config can be a bit smarter. For example, if
metricshinting is enabled and the size difference is small, we may as
well not scale.
The nice thing about this is that the configuration of whether and when
to scale bitmaps will be done in fontconfig, not cairo / Qt / ... code.
---
* * *
[FT] Prefer downscaling bitmap glyphs to upscaling
From a8f1b456db744e33a10b2301df03528787e5b1ca Mon Sep 17 00:00:00 2001
Say, you have bitmap strikes for sizes 50ppem and 100ppem.
To render at 60ppem, it's much better to downscale the 100ppem
bitmap than upscale 50ppem one. Prefer downscaling.
---
* * *
[ft] I meant fabs(), not abs()
From 13bd8d09b44e50649f6fc4d58d036bc32c1d5c5b Mon Sep 17 00:00:00 2001
---
* * *
[ft] Fix memory bug in copying bitmaps
From a0f556f37fb7016aa304b7cf0e811c0d38f0b969 Mon Sep 17 00:00:00 2001
---
* * *
[ft] Fix wrong assumptions
From e738079302a968b7b1fb9101cd4d92a8887bedce Mon Sep 17 00:00:00 2001
If subpixel rendering is enabled, but FT returns a 8bit gray bitmap
(perhaps because the font has 8bit embedded bitmaps) we were hitting
the assertions because the assumptions made were wrong. Fix up.
---
* * *
Towards support loading color glyphs from FreeType
From 2cc353c3dbe01b4d8f65d6de800f2b1d6004a1c2 Mon Sep 17 00:00:00 2001
See comments.
---
* * *
Support 2bit and 4bit embedded bitmaps
From 9444ef09ccde2735258cc1bd2f1912119a32dd88 Mon Sep 17 00:00:00 2001
---
* * *
[ft] Fix math
From 7d26341072b13a78d4b3fe58779057ac020be487 Mon Sep 17 00:00:00 2001
---
* * *
[ft] Add missing include
From 0554d76402321b25cc952180e4d19436a9038d1a Mon Sep 17 00:00:00 2001
---
* * *
[ft] Fix alignment
From 34a747e7bdeba1cfe17318f80fbe6720d47bc023 Mon Sep 17 00:00:00 2001
---
* * *
[ft] Ensure alignment of bitmaps received from FreeType
From 46d9db96d460fea72f0420102e8a90c6a7231f79 Mon Sep 17 00:00:00 2001
---