Bug 1529698 - Part 1: Make LayerState enum class r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D30837
This commit is contained in:
@@ -1815,7 +1815,7 @@ LayerState nsDisplayImage::GetLayerState(
|
||||
NS_FAILED(mImage->GetAnimated(&animated)) || !animated) {
|
||||
if (!aManager->IsCompositingCheap() ||
|
||||
!nsLayoutUtils::GPUImageScalingEnabled()) {
|
||||
return LAYER_NONE;
|
||||
return LayerState::LAYER_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1838,27 +1838,27 @@ LayerState nsDisplayImage::GetLayerState(
|
||||
|
||||
// If we are not scaling at all, no point in separating this into a layer.
|
||||
if (scale.width == 1.0f && scale.height == 1.0f) {
|
||||
return LAYER_NONE;
|
||||
return LayerState::LAYER_NONE;
|
||||
}
|
||||
|
||||
// If the target size is pretty small, no point in using a layer.
|
||||
if (destLayerRect.width * destLayerRect.height < 64 * 64) {
|
||||
return LAYER_NONE;
|
||||
return LayerState::LAYER_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!CanOptimizeToImageLayer(aManager, aBuilder)) {
|
||||
return LAYER_NONE;
|
||||
return LayerState::LAYER_NONE;
|
||||
}
|
||||
|
||||
// Image layer doesn't support draw focus ring for image map.
|
||||
nsImageFrame* f = static_cast<nsImageFrame*>(mFrame);
|
||||
if (f->HasImageMap()) {
|
||||
return LAYER_NONE;
|
||||
return LayerState::LAYER_NONE;
|
||||
}
|
||||
|
||||
return LAYER_ACTIVE;
|
||||
return LayerState::LAYER_ACTIVE;
|
||||
}
|
||||
|
||||
/* virtual */
|
||||
|
||||
Reference in New Issue
Block a user