зеркало из https://github.com/mozilla/gecko-dev.git
Bug 782332 - Don't retain fixed-position tiles. r=bgirard
Retaining tiles on a fixed position layer often just results in rendering artifacts. Don't do this.
This commit is contained in:
Родитель
2c8602f652
Коммит
8bf5620a83
|
@ -115,10 +115,9 @@ TiledThebesLayerOGL::TiledThebesLayerOGL(LayerManagerOGL *aManager)
|
|||
: ShadowThebesLayer(aManager, nullptr)
|
||||
, LayerOGL(aManager)
|
||||
, mVideoMemoryTiledBuffer(aManager->gl())
|
||||
, mReusableTileStore(nsnull)
|
||||
{
|
||||
mImplData = static_cast<LayerOGL*>(this);
|
||||
// XXX Add a pref for reusable tile store size
|
||||
mReusableTileStore = new ReusableTileStoreOGL(aManager->gl(), 1);
|
||||
}
|
||||
|
||||
TiledThebesLayerOGL::~TiledThebesLayerOGL()
|
||||
|
@ -145,6 +144,17 @@ TiledThebesLayerOGL::ProcessUploadQueue()
|
|||
if (mRegionToUpload.IsEmpty())
|
||||
return;
|
||||
|
||||
// We should only be retaining old tiles if we're not fixed position.
|
||||
// Fixed position layers don't/shouldn't move on the screen, so retaining
|
||||
// tiles is not useful and often results in rendering artifacts.
|
||||
if (mReusableTileStore && mIsFixedPosition) {
|
||||
delete mReusableTileStore;
|
||||
mReusableTileStore = nsnull;
|
||||
} else if (!mReusableTileStore && !mIsFixedPosition) {
|
||||
// XXX Add a pref for reusable tile store size
|
||||
mReusableTileStore = new ReusableTileStoreOGL(gl(), 1);
|
||||
}
|
||||
|
||||
gfxSize resolution(1, 1);
|
||||
if (mReusableTileStore) {
|
||||
// Work out render resolution by multiplying the resolution of our ancestors.
|
||||
|
|
Загрузка…
Ссылка в новой задаче