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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 2632593003: Notify listeners on OffScreenCanvas changes (Closed)
Patch Set: Created 3 years, 11 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/core/html/HTMLCanvasElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
index 68d1351e64a3af40a74ff91a8bf00eac10f2c91e..b151a05b6358240e96214c5129f3a4d650dff5f0 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -1337,6 +1337,17 @@ ScriptPromise HTMLCanvasElement::createImageBitmap(
isPaintable() ? ImageBitmap::create(this, cropRect, options) : nullptr);
}
+void HTMLCanvasElement::setPlaceholderFrame(
+ RefPtr<StaticBitmapImage> image,
+ WeakPtr<OffscreenCanvasFrameDispatcher> dispatcher,
+ RefPtr<WebTaskRunner> taskRunner,
+ unsigned resourceId) {
+ OffscreenCanvasPlaceholder::setPlaceholderFrame(
+ std::move(image), std::move(dispatcher), std::move(taskRunner),
+ resourceId);
+ notifyListenersCanvasChanged();
+}
+
bool HTMLCanvasElement::isOpaque() const {
return m_context && !m_context->creationAttributes().alpha();
}

Powered by Google App Engine
This is Rietveld 408576698