mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 805689. Don't copy when we don't need subpixel AA. r=mwoodrow
Avoid copying the background for subpixel AA when we aren't using subpixel AA rendering.
This commit is contained in:
parent
f42a5be8e2
commit
7cb5d16857
@ -5,6 +5,7 @@
|
||||
|
||||
#include "ContainerLayerOGL.h"
|
||||
#include "gfxUtils.h"
|
||||
#include "gfxPlatform.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
@ -209,10 +210,12 @@ ContainerRender(Container* aContainer,
|
||||
// not safe.
|
||||
if (HasOpaqueAncestorLayer(aContainer) &&
|
||||
transform3D.Is2D(&transform) && !transform.HasNonIntegerTranslation()) {
|
||||
mode = LayerManagerOGL::InitModeCopy;
|
||||
mode = gfxPlatform::GetPlatform()->UsesSubpixelAATextRendering() ?
|
||||
LayerManagerOGL::InitModeCopy :
|
||||
LayerManagerOGL::InitModeClear;
|
||||
framebufferRect.x += transform.x0;
|
||||
framebufferRect.y += transform.y0;
|
||||
aContainer->mSupportsComponentAlphaChildren = true;
|
||||
aContainer->mSupportsComponentAlphaChildren = gfxPlatform::GetPlatform()->UsesSubpixelAATextRendering();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -310,6 +310,13 @@ public:
|
||||
*/
|
||||
virtual bool FontHintingEnabled() { return true; }
|
||||
|
||||
bool UsesSubpixelAATextRendering() {
|
||||
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
|
||||
return false;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether to check all font cmaps during system font fallback
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user