Bug 1391996 - Move some checks from nsDisplayText::GetLayerState to constructor to prevent ambiguous status. r=jrmuizel

MozReview-Commit-ID: QPSIqLz56p

--HG--
extra : rebase_source : 1c4db4b0111126b79f4d3e5ab8f693545f1cbd70
This commit is contained in:
Ethan Lin 2017-08-21 14:52:31 +08:00
Родитель 448e22c303
Коммит d9862646f9
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -5150,6 +5150,10 @@ nsDisplayText::nsDisplayText(nsDisplayListBuilder* aBuilder, nsTextFrame* aFrame
// TODO: Paint() checks mDisableSubpixelAA, we should too. // TODO: Paint() checks mDisableSubpixelAA, we should too.
RenderToContext(captureCtx, mTextDrawer, aBuilder, true); RenderToContext(captureCtx, mTextDrawer, aBuilder, true);
if (!mTextDrawer->CanSerializeFonts()) {
mTextDrawer = nullptr;
}
} }
} }
@ -5159,9 +5163,7 @@ nsDisplayText::GetLayerState(nsDisplayListBuilder* aBuilder,
const ContainerLayerParameters& aParameters) const ContainerLayerParameters& aParameters)
{ {
// Basic things that all advanced backends need // Basic things that all advanced backends need
if (!mTextDrawer || if (!mTextDrawer) {
!mTextDrawer->CanSerializeFonts() ||
XRE_IsParentProcess()) {
return mozilla::LAYER_NONE; return mozilla::LAYER_NONE;
} }