| 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 bd018fb2bb42717c660af90e3f0df765951d9797..2039f5f53c2ca6c99446ef332be916b4faa2a8f6 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| @@ -1397,15 +1397,19 @@ String HTMLCanvasElement::getIdFromControl(const Element* element) {
|
| return String();
|
| }
|
|
|
| -bool HTMLCanvasElement::createSurfaceLayer() {
|
| +void HTMLCanvasElement::createLayer() {
|
| DCHECK(!m_surfaceLayerBridge);
|
| mojom::blink::OffscreenCanvasSurfacePtr service;
|
| Platform::current()->interfaceProvider()->getInterface(
|
| mojo::GetProxy(&service));
|
| m_surfaceLayerBridge =
|
| - WTF::wrapUnique(new CanvasSurfaceLayerBridge(std::move(service)));
|
| - return m_surfaceLayerBridge->createSurfaceLayer(this->width(),
|
| - this->height());
|
| + WTF::wrapUnique(new CanvasSurfaceLayerBridge(std::move(service), this));
|
| + // Creates a placeholder layer first before Surface is created.
|
| + m_surfaceLayerBridge->createSolidColorLayer();
|
| +}
|
| +
|
| +void HTMLCanvasElement::OnWebLayerReplaced() {
|
| + setNeedsCompositingUpdate();
|
| }
|
|
|
| } // namespace blink
|
|
|