mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1248822 - In LayerManagerComposite::UpdateAndRender(), call PostProcessLayers() before LayerTreeInvalidation. r=mattwoodrow (503f81f51f) - Bug 1259541 - Reduce clearing backbuffer in nsBaseWidget::CreateBackBufferDrawTarget() r=mattwoodrow (4f8cf8ab04) - Bug 1174461 - [e10s] Return a cached result from SendGetNativePluginPort (r=jimm) a=kwierso (fff65b95ac) - Bug 1263200 - Reset the APZ pointer in the base widget to null if the compositor creation fails. r=mstange (109d4a16a8) - Bug 1264161 - Ensure we null out APZ pointers to the widget when it gets destroyed. r=botond (fdb516451e) - Bug 1260018 - Route drag events to APZ, so it can accurately detect the end of a drag. r=kats (acd2b4a051) - Remove drawWidgetAsOnScreen. (bug 1264393, r=mattwoodrow, webidl r=khuey) (b0ce23eacc) - Bug 1254151 - use B8G8R8X8 for 24 bit depth visuals in nsShmImage with Cairo. r=jrmuizel (070ef9495d) - Bug 1218955 - Remove nsIMEPicker, r=jchen (83adb6c582) - Bug 1255655 - Const-ify keysymtab. r=karlt. (d9544cbf0c) - Bug 1165048 - Music playback is getting stopped and is not resumed when modem is restarted. r=mwu (d3f99f8542) - Bug 1264183. Remove unused argument to nsView::InvalidateHierarchy. r=mats (218ce04623) - Bug 1210617 - [e10s] Implement PrivateBrowsingChannel for ExternalHelperAppParent. r=jduell (36e6ab7635) - Bug 1258087 - Fix -Wunreachable-code warning in StartupCache.cpp on macosx64-mulet. r=froydnj (5f88df6993) - Bug 1329798 - Include sys/sysmacros.h for major(), minor() on Linux. r=glandium, a=jcristau (a5c4073eb2) - guard for non-linux system again or mac & FreeBSD fail to compile (6b5d2856b6)
This commit is contained in:
@@ -162,7 +162,7 @@ BasicCompositor::CreateRenderTargetFromSource(const IntRect &aRect,
|
||||
}
|
||||
|
||||
already_AddRefed<CompositingRenderTarget>
|
||||
BasicCompositor::CreateRenderTargetForWindow(const LayoutDeviceIntRect& aRect, SurfaceInitMode aInit, BufferMode aBufferMode)
|
||||
BasicCompositor::CreateRenderTargetForWindow(const LayoutDeviceIntRect& aRect, const LayoutDeviceIntRect& aClearRect, BufferMode aBufferMode)
|
||||
{
|
||||
MOZ_ASSERT(mDrawTarget);
|
||||
MOZ_ASSERT(aRect.width != 0 && aRect.height != 0, "Trying to create a render target of invalid size");
|
||||
@@ -175,7 +175,7 @@ BasicCompositor::CreateRenderTargetForWindow(const LayoutDeviceIntRect& aRect, S
|
||||
IntRect rect = aRect.ToUnknownRect();
|
||||
|
||||
if (aBufferMode != BufferMode::BUFFER_NONE) {
|
||||
RefPtr<DrawTarget> target = mWidget->CreateBackBufferDrawTarget(mDrawTarget, aRect, aInit == INIT_MODE_CLEAR);
|
||||
RefPtr<DrawTarget> target = mWidget->CreateBackBufferDrawTarget(mDrawTarget, aRect, aClearRect);
|
||||
if (!target) {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -187,8 +187,9 @@ BasicCompositor::CreateRenderTargetForWindow(const LayoutDeviceIntRect& aRect, S
|
||||
windowRect.ExpandToEnclose(IntPoint(0, 0));
|
||||
}
|
||||
rt = new BasicCompositingRenderTarget(mDrawTarget, windowRect);
|
||||
if (aInit == INIT_MODE_CLEAR) {
|
||||
mDrawTarget->ClearRect(Rect(rect - rt->GetOrigin()));
|
||||
if (!aClearRect.IsEmpty()) {
|
||||
IntRect clearRect = aRect.ToUnknownRect();
|
||||
mDrawTarget->ClearRect(Rect(clearRect - rt->GetOrigin()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -476,7 +477,7 @@ void
|
||||
BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
|
||||
const gfx::Rect *aClipRectIn,
|
||||
const gfx::Rect& aRenderBounds,
|
||||
bool aOpaque,
|
||||
const nsIntRegion& aOpaqueRegion,
|
||||
gfx::Rect *aClipRectOut /* = nullptr */,
|
||||
gfx::Rect *aRenderBoundsOut /* = nullptr */)
|
||||
{
|
||||
@@ -524,11 +525,20 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
|
||||
return;
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect clearRect;
|
||||
if (!aOpaqueRegion.IsEmpty()) {
|
||||
LayoutDeviceIntRegion clearRegion = mInvalidRegion;
|
||||
clearRegion.SubOut(LayoutDeviceIntRegion::FromUnknownRegion(aOpaqueRegion));
|
||||
clearRect = clearRegion.GetBounds();
|
||||
} else {
|
||||
clearRect = mInvalidRect;
|
||||
}
|
||||
|
||||
// Setup an intermediate render target to buffer all compositing. We will
|
||||
// copy this into mDrawTarget (the widget), and/or mTarget in EndFrame()
|
||||
RefPtr<CompositingRenderTarget> target =
|
||||
CreateRenderTargetForWindow(mInvalidRect,
|
||||
aOpaque ? INIT_MODE_NONE : INIT_MODE_CLEAR,
|
||||
clearRect,
|
||||
bufferMode);
|
||||
if (!target) {
|
||||
if (!mTarget) {
|
||||
|
||||
Reference in New Issue
Block a user