Skip to content

Commit

Permalink
[embedlite] Only widget hosting window can create compositor. Fixes J…
Browse files Browse the repository at this point in the history
…B#35134

Child widgets created by EmbedLitePuppetWidget cannot end up
creating new compositor when requesting LayerManager (GetLayerManager).

On possible backtrace:
1) EmbedLitePuppetWidget::Invalidate
2) nsView::WillPaintWindow
3) nsViewManager::WillPaintWindow
4) EmbedLitePuppetWidget::GetLayerManager
5) EmbedLitePuppetWidget::CreateCompositor

See also https://bugs.merproject.org/show_bug.cgi?id=1603
  • Loading branch information
rainemak committed Jun 16, 2016
1 parent 55b9712 commit 0cf35e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion embedding/embedlite/embedshared/EmbedLitePuppetWidget.cpp
Expand Up @@ -635,7 +635,10 @@ EmbedLitePuppetWidget::GetLayerManager(PLayerTransactionChild* aShadowManager,

mUseLayersAcceleration = ComputeShouldAccelerate(mUseLayersAcceleration);

if (ShouldUseOffMainThreadCompositing()) {
// TODO : We should really split this into Android/Gonk like nsWindow and separate PuppetWidget
// Only Widget hosting window can create compositor.
// Bug: https://bugs.merproject.org/show_bug.cgi?id=1603
if (mWindow && ShouldUseOffMainThreadCompositing()) {
CreateCompositor();
if (mLayerManager) {
return mLayerManager;
Expand Down

0 comments on commit 0cf35e2

Please sign in to comment.