| 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 ec3b48206e6f0da15963f01768e62ad4a3a33ec1..c1048da6b52fc3bc8038867496ca3ed5fb4a35c2 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"
|
| @@ -6496,4 +6497,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
|
|
|