Bug 1255703 - Use image surfaces for basic compositor on Windows r=mattwoodrow
This commit is contained in:
@@ -174,10 +174,11 @@ BasicCompositor::CreateRenderTargetForWindow(const LayoutDeviceIntRect& aRect, c
|
||||
IntRect rect = aRect.ToUnknownRect();
|
||||
|
||||
if (aBufferMode != BufferMode::BUFFER_NONE) {
|
||||
RefPtr<DrawTarget> target = mWidget->CreateBackBufferDrawTarget(mDrawTarget, aRect, aClearRect);
|
||||
RefPtr<DrawTarget> target = mWidget->GetBackBufferDrawTarget(mDrawTarget, aRect, aClearRect);
|
||||
if (!target) {
|
||||
return nullptr;
|
||||
}
|
||||
MOZ_ASSERT(target != mDrawTarget);
|
||||
rt = new BasicCompositingRenderTarget(target, rect);
|
||||
} else {
|
||||
IntRect windowRect = rect;
|
||||
@@ -590,7 +591,12 @@ BasicCompositor::EndFrame()
|
||||
if (mTarget || mRenderTarget->mDrawTarget != mDrawTarget) {
|
||||
// Note: Most platforms require us to buffer drawing to the widget surface.
|
||||
// That's why we don't draw to mDrawTarget directly.
|
||||
RefPtr<SourceSurface> source = mRenderTarget->mDrawTarget->Snapshot();
|
||||
RefPtr<SourceSurface> source;
|
||||
if (mRenderTarget->mDrawTarget != mDrawTarget) {
|
||||
source = mWidget->EndBackBufferDrawing();
|
||||
} else {
|
||||
source = mRenderTarget->mDrawTarget->Snapshot();
|
||||
}
|
||||
RefPtr<DrawTarget> dest(mTarget ? mTarget : mDrawTarget);
|
||||
|
||||
nsIntPoint offset = mTarget ? mTargetBounds.TopLeft() : nsIntPoint();
|
||||
|
||||
Reference in New Issue
Block a user