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

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

Issue 2390973002: Use per-frame WebTaskRunner in HTMLCanvasElement
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3d4ef0a1a3c796c9c8924e38c78b2339033c701f..6dbe9eb35c0d9571b8a9b6c6037aef323daca61f 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -350,15 +350,11 @@ void HTMLCanvasElement::didFinalizeFrame() {
!m_pendingRenderingModeSwitch) {
if (!m_context->isAccelerationOptimalForCanvasContent()) {
// The switch must be done asynchronously in order to avoid switching during the paint invalidation step.
- Platform::current()->currentThread()->getWebTaskRunner()->postTask(
- BLINK_FROM_HERE,
- WTF::bind(
- [](WeakPtr<ImageBuffer> buffer) {
- if (buffer) {
- buffer->disableAcceleration();
- }
- },
- m_imageBuffer->m_weakPtrFactory.createWeakPtr()));
+ TaskRunnerHelper::get(TaskType::Internal, getExecutionContext())
+ ->postTask(
+ BLINK_FROM_HERE,
+ WTF::bind(&ImageBuffer::disableAcceleration,
+ m_imageBuffer->m_weakPtrFactory.createWeakPtr()));
m_numFramesSinceLastRenderingModeSwitch = 0;
m_pendingRenderingModeSwitch = true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698