| Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| index 748e130cb9231db90a7caeaf9129ed9d57511c39..5fbbbae804cc29c5758b026e8aa9762a0231e295 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| @@ -28,6 +28,7 @@
|
| #include "bindings/core/v8/ExceptionMessages.h"
|
| #include "bindings/core/v8/ExceptionState.h"
|
| #include "bindings/core/v8/V8BindingMacros.h"
|
| +#include "bindings/modules/v8/HTMLCanvasElementOrOffscreenCanvas.h"
|
| #include "bindings/modules/v8/WebGLAny.h"
|
| #include "core/dom/DOMArrayBuffer.h"
|
| #include "core/dom/DOMTypedArray.h"
|
| @@ -6501,4 +6502,12 @@ void WebGLRenderingContextBase::restoreUnpackParameters()
|
| contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment);
|
| }
|
|
|
| +void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(HTMLCanvasElementOrOffscreenCanvas& result) const
|
| +{
|
| + if (canvas())
|
| + result.setHTMLCanvasElement(canvas());
|
| + else
|
| + result.setOffscreenCanvas(getOffscreenCanvas());
|
| +}
|
| +
|
| } // namespace blink
|
|
|