| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1448 DCHECK(!surface_layer_bridge_); | 1448 DCHECK(!surface_layer_bridge_); |
| 1449 LocalFrame* frame = GetDocument().GetFrame(); | 1449 LocalFrame* frame = GetDocument().GetFrame(); |
| 1450 WebLayerTreeView* layer_tree_view = nullptr; | 1450 WebLayerTreeView* layer_tree_view = nullptr; |
| 1451 // TODO(xlai): Ensure OffscreenCanvas commit() is still functional when a | 1451 // TODO(xlai): Ensure OffscreenCanvas commit() is still functional when a |
| 1452 // frame-less HTML canvas's document is reparenting under another frame. | 1452 // frame-less HTML canvas's document is reparenting under another frame. |
| 1453 // See crbug.com/683172. | 1453 // See crbug.com/683172. |
| 1454 if (frame) { | 1454 if (frame) { |
| 1455 layer_tree_view = | 1455 layer_tree_view = |
| 1456 frame->GetPage()->GetChromeClient().GetWebLayerTreeView(frame); | 1456 frame->GetPage()->GetChromeClient().GetWebLayerTreeView(frame); |
| 1457 surface_layer_bridge_ = | 1457 surface_layer_bridge_ = |
| 1458 WTF::MakeUnique<CanvasSurfaceLayerBridge>(this, layer_tree_view); | 1458 WTF::MakeUnique<::blink::SurfaceLayerBridge>(this, layer_tree_view); |
| 1459 // Creates a placeholder layer first before Surface is created. | 1459 // Creates a placeholder layer first before Surface is created. |
| 1460 surface_layer_bridge_->CreateSolidColorLayer(); | 1460 surface_layer_bridge_->CreateSolidColorLayer(); |
| 1461 } | 1461 } |
| 1462 } | 1462 } |
| 1463 | 1463 |
| 1464 void HTMLCanvasElement::OnWebLayerReplaced() { | 1464 void HTMLCanvasElement::OnWebLayerReplaced() { |
| 1465 SetNeedsCompositingUpdate(); | 1465 SetNeedsCompositingUpdate(); |
| 1466 } | 1466 } |
| 1467 | 1467 |
| 1468 } // namespace blink | 1468 } // namespace blink |
| OLD | NEW |