| 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 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1447 DCHECK(!surface_layer_bridge_); | 1447 DCHECK(!surface_layer_bridge_); |
| 1448 LocalFrame* frame = GetDocument().GetFrame(); | 1448 LocalFrame* frame = GetDocument().GetFrame(); |
| 1449 WebLayerTreeView* layer_tree_view = nullptr; | 1449 WebLayerTreeView* layer_tree_view = nullptr; |
| 1450 // TODO(xlai): Ensure OffscreenCanvas commit() is still functional when a | 1450 // TODO(xlai): Ensure OffscreenCanvas commit() is still functional when a |
| 1451 // frame-less HTML canvas's document is reparenting under another frame. | 1451 // frame-less HTML canvas's document is reparenting under another frame. |
| 1452 // See crbug.com/683172. | 1452 // See crbug.com/683172. |
| 1453 if (frame) { | 1453 if (frame) { |
| 1454 layer_tree_view = | 1454 layer_tree_view = |
| 1455 frame->GetPage()->GetChromeClient().GetWebLayerTreeView(frame); | 1455 frame->GetPage()->GetChromeClient().GetWebLayerTreeView(frame); |
| 1456 surface_layer_bridge_ = | 1456 surface_layer_bridge_ = |
| 1457 WTF::MakeUnique<CanvasSurfaceLayerBridge>(this, layer_tree_view); | 1457 WTF::MakeUnique<::blink::SurfaceLayerBridge>(this, layer_tree_view); |
| 1458 // Creates a placeholder layer first before Surface is created. | 1458 // Creates a placeholder layer first before Surface is created. |
| 1459 surface_layer_bridge_->CreateSolidColorLayer(); | 1459 surface_layer_bridge_->CreateSolidColorLayer(); |
| 1460 } | 1460 } |
| 1461 } | 1461 } |
| 1462 | 1462 |
| 1463 void HTMLCanvasElement::OnWebLayerReplaced() { | 1463 void HTMLCanvasElement::OnWebLayerReplaced() { |
| 1464 SetNeedsCompositingUpdate(); | 1464 SetNeedsCompositingUpdate(); |
| 1465 } | 1465 } |
| 1466 | 1466 |
| 1467 } // namespace blink | 1467 } // namespace blink |
| OLD | NEW |