mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 980642 - Implement Clear regions for ClientLayerManager/LayerManagerComposite. r=roc
This commit is contained in:
parent
6fa7f32cb8
commit
ebd1398b79
@ -352,7 +352,7 @@ ClientLayerManager::ForwardTransaction(bool aScheduleComposite)
|
||||
// forward this transaction's changeset to our LayerManagerComposite
|
||||
bool sent;
|
||||
AutoInfallibleTArray<EditReply, 10> replies;
|
||||
if (HasShadowManager() && mForwarder->EndTransaction(&replies, aScheduleComposite, &sent)) {
|
||||
if (HasShadowManager() && mForwarder->EndTransaction(&replies, mRegionToClear, aScheduleComposite, &sent)) {
|
||||
for (nsTArray<EditReply>::size_type i = 0; i < replies.Length(); ++i) {
|
||||
const EditReply& reply = replies[i];
|
||||
|
||||
|
@ -497,6 +497,14 @@ LayerManagerComposite::Render()
|
||||
// Render our layers.
|
||||
RootLayer()->RenderLayer(clipRect);
|
||||
|
||||
if (!mRegionToClear.IsEmpty()) {
|
||||
nsIntRegionRectIterator iter(mRegionToClear);
|
||||
const nsIntRect *r;
|
||||
while ((r = iter.Next())) {
|
||||
mCompositor->ClearRect(Rect(r->x, r->y, r->width, r->height));
|
||||
}
|
||||
}
|
||||
|
||||
// Allow widget to render a custom foreground.
|
||||
mCompositor->GetWidget()->DrawWindowOverlay(this, nsIntRect(actualBounds.x,
|
||||
actualBounds.y,
|
||||
|
@ -740,6 +740,7 @@ CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
||||
// change, dimension change would be done at the stage, update the size here is free of
|
||||
// race condition.
|
||||
mLayerManager->UpdateRenderBounds(aTargetConfig.clientBounds());
|
||||
mLayerManager->SetRegionToClear(aTargetConfig.clearRegion());
|
||||
|
||||
mCompositionManager->Updated(aIsFirstPaint, aTargetConfig);
|
||||
Layer* root = aLayerTree->GetRoot();
|
||||
|
@ -49,6 +49,7 @@ struct TargetConfig {
|
||||
ScreenRotation rotation;
|
||||
nsIntRect clientBounds;
|
||||
ScreenOrientation orientation;
|
||||
nsIntRegion clearRegion;
|
||||
};
|
||||
|
||||
// Create a shadow layer for |layer|
|
||||
|
@ -465,7 +465,10 @@ ShadowLayerForwarder::RemoveTexture(TextureClient* aTexture)
|
||||
}
|
||||
|
||||
bool
|
||||
ShadowLayerForwarder::EndTransaction(InfallibleTArray<EditReply>* aReplies, bool aScheduleComposite, bool* aSent)
|
||||
ShadowLayerForwarder::EndTransaction(InfallibleTArray<EditReply>* aReplies,
|
||||
const nsIntRegion& aRegionToClear,
|
||||
bool aScheduleComposite,
|
||||
bool* aSent)
|
||||
{
|
||||
*aSent = false;
|
||||
|
||||
@ -561,7 +564,11 @@ ShadowLayerForwarder::EndTransaction(InfallibleTArray<EditReply>* aReplies, bool
|
||||
|
||||
mWindowOverlayChanged = false;
|
||||
|
||||
TargetConfig targetConfig(mTxn->mTargetBounds, mTxn->mTargetRotation, mTxn->mClientBounds, mTxn->mTargetOrientation);
|
||||
TargetConfig targetConfig(mTxn->mTargetBounds,
|
||||
mTxn->mTargetRotation,
|
||||
mTxn->mClientBounds,
|
||||
mTxn->mTargetOrientation,
|
||||
aRegionToClear);
|
||||
|
||||
MOZ_LAYERS_LOG(("[LayersForwarder] syncing before send..."));
|
||||
PlatformSyncBeforeUpdate();
|
||||
|
@ -329,7 +329,10 @@ public:
|
||||
* |aReplies| are directions from the LayerManagerComposite to the
|
||||
* caller of EndTransaction().
|
||||
*/
|
||||
bool EndTransaction(InfallibleTArray<EditReply>* aReplies, bool aScheduleComposite, bool* aSent);
|
||||
bool EndTransaction(InfallibleTArray<EditReply>* aReplies,
|
||||
const nsIntRegion& aRegionToClear,
|
||||
bool aScheduleComposite,
|
||||
bool* aSent);
|
||||
|
||||
/**
|
||||
* Set an actor through which layer updates will be pushed.
|
||||
|
Loading…
Reference in New Issue
Block a user