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

Unified Diff: third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp

Issue 1881563003: Implement OffscreenCanvas.getContext('webgl') (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and remove static_cast Created 4 years, 8 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/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
diff --git a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
index 4a60e82c253a096955c994eb4a863490d0a88732..758318b868cfc03fdff88fcf6e793f1ef12ac287 100644
--- a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
@@ -19,7 +19,7 @@ OffscreenCanvasRenderingContext2D::~OffscreenCanvasRenderingContext2D()
}
OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D(OffscreenCanvas* canvas, const CanvasContextCreationAttributes& attrs)
- : CanvasRenderingContext(canvas)
+ : CanvasRenderingContext(nullptr, canvas)
, m_hasAlpha(attrs.alpha())
{
}
@@ -95,6 +95,11 @@ ImageBitmap* OffscreenCanvasRenderingContext2D::transferToImageBitmap(ExceptionS
return ImageBitmap::create(image.release());
}
+void OffscreenCanvasRenderingContext2D::setOffscreenCanvasGetContextResult(OffscreenRenderingContext& result)
+{
+ result.setOffscreenCanvasRenderingContext2D(this);
+}
+
bool OffscreenCanvasRenderingContext2D::parseColorOrCurrentColor(Color& color, const String& colorString) const
{
return ::blink::parseColorOrCurrentColor(color, colorString, nullptr);

Powered by Google App Engine
This is Rietveld 408576698