mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
parent
f75592fd13
commit
9b1124ccbd
99 changed files with 6 additions and 15647 deletions
|
|
@ -42,7 +42,6 @@
|
|||
#include "nsRefreshDriver.h"
|
||||
#include "nsStreamUtils.h"
|
||||
#include "ActiveLayerTracker.h"
|
||||
#include "VRManagerChild.h"
|
||||
#include "WebGL1Context.h"
|
||||
#include "WebGL2Context.h"
|
||||
|
||||
|
|
@ -358,7 +357,6 @@ NS_IMPL_ISUPPORTS(HTMLCanvasElementObserver, nsIObserver)
|
|||
HTMLCanvasElement::HTMLCanvasElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
||||
: nsGenericHTMLElement(aNodeInfo),
|
||||
mResetLayer(true) ,
|
||||
mVRPresentationActive(false),
|
||||
mWriteOnly(false)
|
||||
{}
|
||||
|
||||
|
|
@ -1111,7 +1109,7 @@ HTMLCanvasElement::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
|||
static uint8_t sOffscreenCanvasLayerUserDataDummy = 0;
|
||||
|
||||
if (mCurrentContext) {
|
||||
return mCurrentContext->GetCanvasLayer(aBuilder, aOldLayer, aManager, mVRPresentationActive);
|
||||
return mCurrentContext->GetCanvasLayer(aBuilder, aOldLayer, aManager);
|
||||
}
|
||||
|
||||
if (mOffscreenCanvas) {
|
||||
|
|
@ -1441,42 +1439,5 @@ HTMLCanvasElement::InvalidateFromAsyncCanvasRenderer(AsyncCanvasRenderer *aRende
|
|||
element->InvalidateCanvasContent(nullptr);
|
||||
}
|
||||
|
||||
void
|
||||
HTMLCanvasElement::StartVRPresentation()
|
||||
{
|
||||
WebGLContext* webgl = static_cast<WebGLContext*>(GetContextAtIndex(0));
|
||||
if (!webgl) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!webgl->StartVRPresentation()) {
|
||||
return;
|
||||
}
|
||||
|
||||
mVRPresentationActive = true;
|
||||
}
|
||||
|
||||
void
|
||||
HTMLCanvasElement::StopVRPresentation()
|
||||
{
|
||||
mVRPresentationActive = false;
|
||||
}
|
||||
|
||||
already_AddRefed<layers::SharedSurfaceTextureClient>
|
||||
HTMLCanvasElement::GetVRFrame()
|
||||
{
|
||||
if (GetCurrentContextType() != CanvasContextType::WebGL1 &&
|
||||
GetCurrentContextType() != CanvasContextType::WebGL2) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
WebGLContext* webgl = static_cast<WebGLContext*>(GetContextAtIndex(0));
|
||||
if (!webgl) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return webgl->GetVRFrame();
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue