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

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

Issue 2632593003: Notify listeners on OffScreenCanvas changes (Closed)
Patch Set: Created 3 years, 10 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 5e84495edfae63401b4f9fbcaa38135577e6633f..915fdb13a4fe3c06a6e8d56df0f07ba547ae9a0b 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -1343,6 +1343,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