Bug 1201541 - Use SingleTiledContentClient for non-scrollable layers on Android r=mattwoodrow
This commit is contained in:
@@ -411,12 +411,9 @@ ClientTiledPaintedLayer::RenderLayer()
|
|||||||
void *data = ClientManager()->GetPaintedLayerCallbackData();
|
void *data = ClientManager()->GetPaintedLayerCallbackData();
|
||||||
|
|
||||||
if (!mContentClient) {
|
if (!mContentClient) {
|
||||||
#if defined(MOZ_B2G) || defined(XP_MACOSX)
|
|
||||||
if (mCreationHint == LayerManager::NONE) {
|
if (mCreationHint == LayerManager::NONE) {
|
||||||
mContentClient = new SingleTiledContentClient(this, ClientManager());
|
mContentClient = new SingleTiledContentClient(this, ClientManager());
|
||||||
} else
|
} else {
|
||||||
#endif
|
|
||||||
{
|
|
||||||
mContentClient = new MultiTiledContentClient(this, ClientManager());
|
mContentClient = new MultiTiledContentClient(this, ClientManager());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -560,7 +557,6 @@ ClientTiledPaintedLayer::RenderLayer()
|
|||||||
bool
|
bool
|
||||||
ClientTiledPaintedLayer::IsOptimizedFor(LayerManager::PaintedLayerCreationHint aHint)
|
ClientTiledPaintedLayer::IsOptimizedFor(LayerManager::PaintedLayerCreationHint aHint)
|
||||||
{
|
{
|
||||||
#if defined(MOZ_B2G) || defined(XP_MACOSX)
|
|
||||||
// The only creation hint is whether the layer is scrollable or not, and this
|
// The only creation hint is whether the layer is scrollable or not, and this
|
||||||
// is only respected on B2G and OSX, where it's used to determine whether to
|
// is only respected on B2G and OSX, where it's used to determine whether to
|
||||||
// use a tiled content client or not.
|
// use a tiled content client or not.
|
||||||
@@ -568,9 +564,6 @@ ClientTiledPaintedLayer::IsOptimizedFor(LayerManager::PaintedLayerCreationHint a
|
|||||||
// large, scrollable layers, so we want the layer to be recreated in this
|
// large, scrollable layers, so we want the layer to be recreated in this
|
||||||
// situation.
|
// situation.
|
||||||
return aHint == GetCreationHint();
|
return aHint == GetCreationHint();
|
||||||
#else
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -2040,9 +2040,6 @@ ContainerState::GetLayerCreationHint(const nsIFrame* aAnimatedGeometryRoot)
|
|||||||
{
|
{
|
||||||
// Check whether the layer will be scrollable. This is used as a hint to
|
// Check whether the layer will be scrollable. This is used as a hint to
|
||||||
// influence whether tiled layers are used or not.
|
// influence whether tiled layers are used or not.
|
||||||
if (mParameters.mInLowPrecisionDisplayPort) {
|
|
||||||
return LayerManager::SCROLLABLE;
|
|
||||||
}
|
|
||||||
nsIFrame* animatedGeometryRootParent = aAnimatedGeometryRoot->GetParent();
|
nsIFrame* animatedGeometryRootParent = aAnimatedGeometryRoot->GetParent();
|
||||||
nsIScrollableFrame* scrollable = do_QueryFrame(animatedGeometryRootParent);
|
nsIScrollableFrame* scrollable = do_QueryFrame(animatedGeometryRootParent);
|
||||||
if (scrollable
|
if (scrollable
|
||||||
|
|||||||
Reference in New Issue
Block a user