зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1576499
- Remove aClipRectOut parameter from Compositor::BeginFrame(). r=mattwoodrow
Whenever *aRenderBoundsOut was non-empty and aClipRectOut was non-null, *aClipRectOut was set to the same value as *aRenderBoundsOut. Depends on D43368 Differential Revision: https://phabricator.services.mozilla.com/D43369 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ec9eb77ab3
Коммит
833a05e47e
|
@ -405,26 +405,18 @@ class Compositor : public TextureSourceProvider {
|
|||
* sufficient.
|
||||
*
|
||||
* aClipRectIn is the clip rect for the window in window space (optional).
|
||||
* aTransform is the transform from user space to window space.
|
||||
* aRenderBounds bounding rect for rendering, in user space.
|
||||
*
|
||||
* If aClipRectIn is null, this method sets *aClipRectOut to the clip rect
|
||||
* actually used for rendering (if aClipRectIn is non-null, we will use that
|
||||
* for the clip rect).
|
||||
* aOpaqueRegion is the area that contains opaque content.
|
||||
*
|
||||
* If aRenderBoundsOut is non-null, it will be set to the render bounds
|
||||
* actually used by the compositor in window space. If aRenderBoundsOut
|
||||
* is returned empty, composition should be aborted.
|
||||
*
|
||||
* If aOpaque is true, then all of aInvalidRegion will be drawn to with
|
||||
* opaque content.
|
||||
*/
|
||||
virtual void BeginFrame(const nsIntRegion& aInvalidRegion,
|
||||
const gfx::IntRect* aClipRectIn,
|
||||
const gfx::IntRect& aRenderBounds,
|
||||
const nsIntRegion& aOpaqueRegion,
|
||||
NativeLayer* aNativeLayer,
|
||||
gfx::IntRect* aClipRectOut = nullptr,
|
||||
gfx::IntRect* aRenderBoundsOut = nullptr) = 0;
|
||||
|
||||
/**
|
||||
|
|
|
@ -891,7 +891,6 @@ void BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
|
|||
const IntRect& aRenderBounds,
|
||||
const nsIntRegion& aOpaqueRegion,
|
||||
NativeLayer* aNativeLayer,
|
||||
IntRect* aClipRectOut /* = nullptr */,
|
||||
IntRect* aRenderBoundsOut /* = nullptr */) {
|
||||
if (mIsPendingEndRemoteDrawing) {
|
||||
// Force to end previous remote drawing.
|
||||
|
@ -1036,9 +1035,6 @@ void BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
|
|||
if (aRenderBoundsOut) {
|
||||
*aRenderBoundsOut = rect;
|
||||
}
|
||||
if (aClipRectOut) {
|
||||
*aClipRectOut = rect;
|
||||
}
|
||||
|
||||
if (aClipRectIn) {
|
||||
mRenderTarget->mDrawTarget->PushClipRect(Rect(*aClipRectIn));
|
||||
|
|
|
@ -120,7 +120,6 @@ class BasicCompositor : public Compositor {
|
|||
const gfx::IntRect* aClipRectIn,
|
||||
const gfx::IntRect& aRenderBounds,
|
||||
const nsIntRegion& aOpaqueRegion, NativeLayer* aNativeLayer,
|
||||
gfx::IntRect* aClipRectOut = nullptr,
|
||||
gfx::IntRect* aRenderBoundsOut = nullptr) override;
|
||||
void NormalDrawingDone() override;
|
||||
void EndFrame() override;
|
||||
|
|
|
@ -995,14 +995,11 @@ bool LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion,
|
|||
IntRect rect(clipRect.X(), clipRect.Y(), clipRect.Width(),
|
||||
clipRect.Height());
|
||||
mCompositor->BeginFrame(aInvalidRegion, &rect, bounds, aOpaqueRegion,
|
||||
mNativeLayerForEntireWindow, nullptr,
|
||||
&actualBounds);
|
||||
mNativeLayerForEntireWindow, &actualBounds);
|
||||
} else {
|
||||
gfx::IntRect rect;
|
||||
mCompositor->BeginFrame(aInvalidRegion, nullptr, bounds, aOpaqueRegion,
|
||||
mNativeLayerForEntireWindow, &rect, &actualBounds);
|
||||
clipRect =
|
||||
ParentLayerIntRect(rect.X(), rect.Y(), rect.Width(), rect.Height());
|
||||
mNativeLayerForEntireWindow, &actualBounds);
|
||||
clipRect = ParentLayerIntRect::FromUnknownRect(actualBounds);
|
||||
}
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
ScreenCoord offset = GetContentShiftForToolbar();
|
||||
|
@ -1238,10 +1235,10 @@ void LayerManagerComposite::RenderToPresentationSurface() {
|
|||
|
||||
nsIntRegion invalid;
|
||||
IntRect bounds = IntRect::Truncate(0, 0, scale * pageWidth, actualHeight);
|
||||
IntRect rect, actualBounds;
|
||||
IntRect actualBounds;
|
||||
MOZ_ASSERT(mRoot->GetOpacity() == 1);
|
||||
mCompositor->BeginFrame(invalid, nullptr, bounds, nsIntRegion(), nullptr,
|
||||
&rect, &actualBounds);
|
||||
&actualBounds);
|
||||
|
||||
// The Java side of Fennec sets a scissor rect that accounts for
|
||||
// chrome such as the URL bar. Override that so that the entire frame buffer
|
||||
|
|
|
@ -1099,7 +1099,6 @@ void CompositorD3D11::BeginFrame(const nsIntRegion& aInvalidRegion,
|
|||
const IntRect& aRenderBounds,
|
||||
const nsIntRegion& aOpaqueRegion,
|
||||
NativeLayer* aNativeLayer,
|
||||
IntRect* aClipRectOut,
|
||||
IntRect* aRenderBoundsOut) {
|
||||
MOZ_RELEASE_ASSERT(!aNativeLayer, "Unexpected native layer on this platform");
|
||||
|
||||
|
@ -1175,9 +1174,6 @@ void CompositorD3D11::BeginFrame(const nsIntRegion& aInvalidRegion,
|
|||
return;
|
||||
}
|
||||
|
||||
if (aClipRectOut) {
|
||||
*aClipRectOut = rect;
|
||||
}
|
||||
if (aRenderBoundsOut) {
|
||||
*aRenderBoundsOut = rect;
|
||||
}
|
||||
|
|
|
@ -90,14 +90,12 @@ class CompositorD3D11 : public Compositor {
|
|||
const gfx::Rect& aVisibleRect) override;
|
||||
|
||||
/**
|
||||
* Start a new frame. If aClipRectIn is null, sets *aClipRectOut to the
|
||||
* screen dimensions.
|
||||
* Start a new frame.
|
||||
*/
|
||||
void BeginFrame(const nsIntRegion& aInvalidRegion,
|
||||
const gfx::IntRect* aClipRectIn,
|
||||
const gfx::IntRect& aRenderBounds,
|
||||
const nsIntRegion& aOpaqueRegion, NativeLayer* aNativeLayer,
|
||||
gfx::IntRect* aClipRectOut = nullptr,
|
||||
gfx::IntRect* aRenderBoundsOut = nullptr) override;
|
||||
|
||||
void NormalDrawingDone() override;
|
||||
|
|
|
@ -872,7 +872,7 @@ void CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,
|
|||
const IntRect* aClipRectIn,
|
||||
const IntRect& aRenderBounds,
|
||||
const nsIntRegion& aOpaqueRegion,
|
||||
NativeLayer* aNativeLayer, IntRect* aClipRectOut,
|
||||
NativeLayer* aNativeLayer,
|
||||
IntRect* aRenderBoundsOut) {
|
||||
AUTO_PROFILER_LABEL("CompositorOGL::BeginFrame", GRAPHICS);
|
||||
|
||||
|
@ -889,9 +889,6 @@ void CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,
|
|||
if (aRenderBoundsOut) {
|
||||
*aRenderBoundsOut = rect;
|
||||
}
|
||||
if (aClipRectOut) {
|
||||
*aClipRectOut = rect;
|
||||
}
|
||||
|
||||
// We can't draw anything to something with no area
|
||||
// so just return
|
||||
|
|
|
@ -364,14 +364,12 @@ class CompositorOGL final : public Compositor {
|
|||
*/
|
||||
void ClearRect(const gfx::Rect& aRect) override;
|
||||
|
||||
/* Start a new frame. If aClipRectIn is null and aClipRectOut is non-null,
|
||||
* sets *aClipRectOut to the screen dimensions.
|
||||
/* Start a new frame.
|
||||
*/
|
||||
void BeginFrame(const nsIntRegion& aInvalidRegion,
|
||||
const gfx::IntRect* aClipRectIn,
|
||||
const gfx::IntRect& aRenderBounds,
|
||||
const nsIntRegion& aOpaqueRegion, NativeLayer* aNativeLayer,
|
||||
gfx::IntRect* aClipRectOut = nullptr,
|
||||
gfx::IntRect* aRenderBoundsOut = nullptr) override;
|
||||
|
||||
ShaderConfigOGL GetShaderConfigFor(
|
||||
|
|
Загрузка…
Ссылка в новой задаче