mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 13:21:28 +00:00
Bug 611164. Fire MozPaintWait event if async plugin rendering hasn't caught up with our desired plugin size. r=romaxa a=roc
This commit is contained in:
parent
6260cae31b
commit
ce8de26472
@ -458,8 +458,7 @@ public:
|
||||
nsIDOMClientRect* clip);
|
||||
#endif
|
||||
|
||||
void NotifyPaintWaiter(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager);
|
||||
void NotifyPaintWaiter(nsDisplayListBuilder* aBuilder);
|
||||
// Return true if we set image with valid surface
|
||||
PRBool SetCurrentImage(ImageContainer* aContainer);
|
||||
|
||||
@ -1701,8 +1700,7 @@ nsObjectFrame::GetImageContainer()
|
||||
}
|
||||
|
||||
void
|
||||
nsPluginInstanceOwner::NotifyPaintWaiter(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager)
|
||||
nsPluginInstanceOwner::NotifyPaintWaiter(nsDisplayListBuilder* aBuilder)
|
||||
{
|
||||
// This is notification for reftests about async plugin paint start
|
||||
if (!mWaitingForPaint && !IsUpToDate() && aBuilder->ShouldSyncDecodeImages()) {
|
||||
@ -1777,7 +1775,7 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
(aBuilder->LayerBuilder()->GetLeafLayerFor(aBuilder, aManager, aItem));
|
||||
|
||||
if (!layer) {
|
||||
mInstanceOwner->NotifyPaintWaiter(aBuilder, aManager);
|
||||
mInstanceOwner->NotifyPaintWaiter(aBuilder);
|
||||
// Initialize ImageLayer
|
||||
layer = aManager->CreateImageLayer();
|
||||
}
|
||||
@ -1801,6 +1799,10 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
layer->SetContentFlags(IsOpaque() ? Layer::CONTENT_OPAQUE : 0);
|
||||
|
||||
if (container->GetCurrentSize() != gfxIntSize(window->width, window->height)) {
|
||||
mInstanceOwner->NotifyPaintWaiter(aBuilder);
|
||||
}
|
||||
|
||||
// Set a transform on the layer to draw the plugin in the right place
|
||||
gfxMatrix transform;
|
||||
// Center plugin if layer size != frame rect
|
||||
|
Loading…
x
Reference in New Issue
Block a user