Bug 1529698 - Part 1: Make LayerState enum class r=mattwoodrow

Differential Revision: https://phabricator.services.mozilla.com/D30837
This commit is contained in:
Miko Mynttinen
2019-05-18 20:11:11 +00:00
parent 8a5644c636
commit ca3f9970ff
10 changed files with 113 additions and 103 deletions

View File

@@ -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 */