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

Unified Diff: third_party/WebKit/Source/modules/InitModules.cpp

Issue 1748163003: Add rendering context and rendering 2D context to OffscreenCanvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make OffscreenCanvasRenderingContext Modules exportable" Created 4 years, 9 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/InitModules.cpp
diff --git a/third_party/WebKit/Source/modules/InitModules.cpp b/third_party/WebKit/Source/modules/InitModules.cpp
index a0663452d2d6fd815dd0695722bc11e9dc119a0d..a81c06b63da11df35fd0d8f4339816f9c100775d 100644
--- a/third_party/WebKit/Source/modules/InitModules.cpp
+++ b/third_party/WebKit/Source/modules/InitModules.cpp
@@ -16,6 +16,8 @@
#include "modules/canvas2d/CanvasRenderingContext2D.h"
#include "modules/filesystem/DraggedIsolatedFileSystemImpl.h"
#include "modules/imagebitmap/ImageBitmapRenderingContext.h"
+#include "modules/offscreencanvas/OffscreenCanvas.h"
+#include "modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h"
#include "modules/webdatabase/DatabaseManager.h"
#include "modules/webgl/WebGL2RenderingContext.h"
#include "modules/webgl/WebGLRenderingContext.h"
@@ -48,6 +50,9 @@ void ModulesInitializer::init()
HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new WebGL2RenderingContext::Factory()));
HTMLCanvasElement::registerRenderingContextFactory(adoptPtr(new ImageBitmapRenderingContext::Factory()));
+ // OffscreenCanvas context types must be registered with the OffscreenCanvas.
+ OffscreenCanvas::registerRenderingContextFactory(adoptPtr(new OffscreenCanvasRenderingContext2D::Factory()));
+
ASSERT(isInitialized());
}

Powered by Google App Engine
This is Rietveld 408576698