Bug 1284324 - Implement Canvas Layer mirrors r=bas
- When a canvas layer is set to mirror, it copies the texture from the canvas rather than changing the texture factory with Morph(). - This is useful when a canvas content will be sent to multiple devices simultaneously, such as a VR HMD and a 2d monitor mirror. - This is used by the WebVR 1.0 API, in Bug 1250244 MozReview-Commit-ID: JfMSockO2uz
This commit is contained in:
@@ -411,6 +411,11 @@ CanvasClientSharedSurface::UpdateRenderer(gfx::IntSize aSize, Renderer& aRendere
|
||||
gfxCriticalError() << "Invalid canvas front buffer";
|
||||
return;
|
||||
}
|
||||
} else if (layer && layer->mIsMirror) {
|
||||
mShSurfClient = CloneSurface(gl->Screen()->Front()->Surf(), layer->mFactory.get());
|
||||
if (!mShSurfClient) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
mShSurfClient = gl->Screen()->Front();
|
||||
if (mShSurfClient && mShSurfClient->GetAllocator() &&
|
||||
|
||||
Reference in New Issue
Block a user