зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1290081 - Make canvas layer transactions asynchronous. r=sotaro
This commit is contained in:
Родитель
400d747599
Коммит
63733308d3
|
@ -98,8 +98,7 @@ CanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
|
|||
mBufferProviderTexture = nullptr;
|
||||
|
||||
AutoRemoveTexture autoRemove(this);
|
||||
if (mBackBuffer &&
|
||||
(mBackBuffer->IsImmutable() || mBackBuffer->GetSize() != aSize)) {
|
||||
if (mBackBuffer && (mBackBuffer->IsReadLocked() || mBackBuffer->GetSize() != aSize)) {
|
||||
autoRemove.mTexture = mBackBuffer;
|
||||
mBackBuffer = nullptr;
|
||||
}
|
||||
|
@ -122,6 +121,7 @@ CanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
|
|||
NS_WARNING("Failed to allocate the TextureClient");
|
||||
return;
|
||||
}
|
||||
mBackBuffer->EnableReadLock();
|
||||
MOZ_ASSERT(mBackBuffer->CanExposeDrawTarget());
|
||||
|
||||
bufferCreated = true;
|
||||
|
|
|
@ -90,16 +90,11 @@ ClientCanvasLayer::RenderLayer()
|
|||
RenderMaskLayers(this);
|
||||
|
||||
if (!mCanvasClient) {
|
||||
TextureFlags flags = TextureFlags::IMMEDIATE_UPLOAD;
|
||||
TextureFlags flags = TextureFlags::DEFAULT;
|
||||
if (mOriginPos == gl::OriginPos::BottomLeft) {
|
||||
flags |= TextureFlags::ORIGIN_BOTTOM_LEFT;
|
||||
}
|
||||
|
||||
if (!mGLContext) {
|
||||
// We don't support locking for buffer surfaces currently
|
||||
flags |= TextureFlags::IMMEDIATE_UPLOAD;
|
||||
}
|
||||
|
||||
if (!mIsAlphaPremultiplied) {
|
||||
flags |= TextureFlags::NON_PREMULTIPLIED;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче