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; |
} |