зеркало из https://github.com/mozilla/gecko-dev.git
Bug 628949 - Update visible region / glass regions after we paint. r=roc a=2.0.
This commit is contained in:
Родитель
a818d74317
Коммит
eed0ad85d7
|
@ -1526,8 +1526,6 @@ nsLayoutUtils::PaintFrame(nsIRenderingContext* aRenderingContext, nsIFrame* aFra
|
||||||
PRUint32 flags = nsDisplayList::PAINT_DEFAULT;
|
PRUint32 flags = nsDisplayList::PAINT_DEFAULT;
|
||||||
if (aFlags & PAINT_WIDGET_LAYERS) {
|
if (aFlags & PAINT_WIDGET_LAYERS) {
|
||||||
flags |= nsDisplayList::PAINT_USE_WIDGET_LAYERS;
|
flags |= nsDisplayList::PAINT_USE_WIDGET_LAYERS;
|
||||||
|
|
||||||
nsIWidget *widget = aFrame->GetNearestWidget();
|
|
||||||
if (willFlushRetainedLayers) {
|
if (willFlushRetainedLayers) {
|
||||||
// The caller wanted to paint from retained layers, but set up
|
// The caller wanted to paint from retained layers, but set up
|
||||||
// the paint in such a way that we can't use them. We're going
|
// the paint in such a way that we can't use them. We're going
|
||||||
|
@ -1537,17 +1535,15 @@ nsLayoutUtils::PaintFrame(nsIRenderingContext* aRenderingContext, nsIFrame* aFra
|
||||||
// not do this.
|
// not do this.
|
||||||
NS_WARNING("Flushing retained layers!");
|
NS_WARNING("Flushing retained layers!");
|
||||||
flags |= nsDisplayList::PAINT_FLUSH_LAYERS;
|
flags |= nsDisplayList::PAINT_FLUSH_LAYERS;
|
||||||
} else if (widget && !(aFlags & PAINT_DOCUMENT_RELATIVE)) {
|
} else if (!(aFlags & PAINT_DOCUMENT_RELATIVE)) {
|
||||||
nsIWidget_MOZILLA_2_0_BRANCH* widget2 =
|
nsIWidget_MOZILLA_2_0_BRANCH *widget2 =
|
||||||
static_cast<nsIWidget_MOZILLA_2_0_BRANCH*>(widget);
|
static_cast<nsIWidget_MOZILLA_2_0_BRANCH*>(aFrame->GetNearestWidget());
|
||||||
PRInt32 pixelRatio = presContext->AppUnitsPerDevPixel();
|
if (widget2) {
|
||||||
nsIntRegion visibleWindowRegion(visibleRegion.ToOutsidePixels(pixelRatio));
|
builder.SetFinalTransparentRegion(visibleRegion);
|
||||||
builder.SetFinalTransparentRegion(visibleRegion);
|
// If we're finished building display list items for painting of the outermost
|
||||||
widget2->UpdateTransparentRegion(visibleWindowRegion);
|
// pres shell, notify the widget about any toolbars we've encountered.
|
||||||
|
widget2->UpdateThemeGeometries(builder.GetThemeGeometries());
|
||||||
// If we're finished building display list items for painting of the outermost
|
}
|
||||||
// pres shell, notify the widget about any toolbars we've encountered.
|
|
||||||
widget2->UpdateThemeGeometries(builder.GetThemeGeometries());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (aFlags & PAINT_EXISTING_TRANSACTION) {
|
if (aFlags & PAINT_EXISTING_TRANSACTION) {
|
||||||
|
@ -1556,6 +1552,20 @@ nsLayoutUtils::PaintFrame(nsIRenderingContext* aRenderingContext, nsIFrame* aFra
|
||||||
|
|
||||||
list.PaintRoot(&builder, aRenderingContext, flags);
|
list.PaintRoot(&builder, aRenderingContext, flags);
|
||||||
|
|
||||||
|
// Update the widget's transparent region information. This sets
|
||||||
|
// glass boundaries on Windows.
|
||||||
|
if ((aFlags & PAINT_WIDGET_LAYERS) &&
|
||||||
|
!willFlushRetainedLayers &&
|
||||||
|
!(aFlags & PAINT_DOCUMENT_RELATIVE)) {
|
||||||
|
nsIWidget_MOZILLA_2_0_BRANCH *widget2 =
|
||||||
|
static_cast<nsIWidget_MOZILLA_2_0_BRANCH*>(aFrame->GetNearestWidget());
|
||||||
|
if (widget2) {
|
||||||
|
PRInt32 pixelRatio = presContext->AppUnitsPerDevPixel();
|
||||||
|
nsIntRegion visibleWindowRegion(visibleRegion.ToOutsidePixels(presContext->AppUnitsPerDevPixel()));
|
||||||
|
widget2->UpdateTransparentRegion(visibleWindowRegion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (gDumpPaintList) {
|
if (gDumpPaintList) {
|
||||||
fprintf(stderr, "Painting --- after optimization:\n");
|
fprintf(stderr, "Painting --- after optimization:\n");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче