Bug 1046017 - Backed out changesets 1c213218173f & 8588817f7f86 (bugs 1017427 & 1006797)

This commit is contained in:
Michael Comella 2014-09-04 18:07:59 -07:00
Родитель 19a72370fc
Коммит bd98315700
2 изменённых файлов: 9 добавлений и 14 удалений

Просмотреть файл

@ -82,12 +82,11 @@ public:
*/
static TemporaryRef<CompositingRenderTargetOGL>
RenderTargetForWindow(CompositorOGL* aCompositor,
const gfx::IntPoint& aOrigin,
const gfx::IntSize& aSize,
const gfx::Matrix& aTransform)
{
RefPtr<CompositingRenderTargetOGL> result
= new CompositingRenderTargetOGL(aCompositor, aOrigin, 0, 0);
= new CompositingRenderTargetOGL(aCompositor, gfx::IntPoint(0, 0), 0, 0);
result->mTransform = aTransform;
result->mInitParams = InitParams(aSize, 0, INIT_MODE_NONE);
result->mInitParams.mStatus = InitParams::INITIALIZED;

Просмотреть файл

@ -596,6 +596,10 @@ CompositorOGL::PrepareViewport(const gfx::IntSize& aSize,
viewMatrix.Scale(1.0f, -1.0f);
}
if (!mTarget) {
viewMatrix.Translate(mRenderOffset.x, mRenderOffset.y);
}
viewMatrix = aWorldTransform * viewMatrix;
Matrix4x4 matrix3d = Matrix4x4::From2D(viewMatrix);
@ -761,17 +765,8 @@ CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,
TexturePoolOGL::Fill(gl());
#endif
// Make sure the render offset is respected. We ignore this when we have a
// target to stop tests failing - this is only used by the Android browser
// UI for its dynamic toolbar.
IntPoint origin;
if (!mTarget) {
origin = -TruncatedToInt(mRenderOffset.ToUnknownPoint());
}
mCurrentRenderTarget =
CompositingRenderTargetOGL::RenderTargetForWindow(this,
origin,
IntSize(width, height),
aTransform);
mCurrentRenderTarget->BindRenderTarget();
@ -1030,11 +1025,12 @@ CompositorOGL::DrawQuad(const Rect& aRect,
MOZ_ASSERT(mFrameInProgress, "frame not started");
IntRect intClipRect;
aClipRect.ToIntRect(&intClipRect);
Rect clipRect = aClipRect;
if (!mTarget) {
intClipRect.MoveBy(mRenderOffset.x, mRenderOffset.y);
clipRect.MoveBy(mRenderOffset.x, mRenderOffset.y);
}
IntRect intClipRect;
clipRect.ToIntRect(&intClipRect);
gl()->fScissor(intClipRect.x, FlipY(intClipRect.y + intClipRect.height),
intClipRect.width, intClipRect.height);