Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(967)

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 2221173003: Updates on canvas backreference for canvas rendering contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Interface listing expected texts Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698