OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 NOTIMPLEMENTED(); | 644 NOTIMPLEMENTED(); |
645 break; | 645 break; |
646 } | 646 } |
647 } | 647 } |
648 | 648 |
649 bool WebFrameWidgetImpl::isAcceleratedCompositingActive() const { | 649 bool WebFrameWidgetImpl::isAcceleratedCompositingActive() const { |
650 return m_isAcceleratedCompositingActive; | 650 return m_isAcceleratedCompositingActive; |
651 } | 651 } |
652 | 652 |
653 void WebFrameWidgetImpl::willCloseLayerTreeView() { | 653 void WebFrameWidgetImpl::willCloseLayerTreeView() { |
654 if (m_layerTreeView) | 654 if (m_layerTreeView) { |
655 page()->willCloseLayerTreeView(*m_layerTreeView); | 655 page()->willCloseLayerTreeView(*m_layerTreeView, |
| 656 m_localRoot->frame()->view()); |
| 657 } |
656 | 658 |
657 setIsAcceleratedCompositingActive(false); | 659 setIsAcceleratedCompositingActive(false); |
658 m_mutator = nullptr; | 660 m_mutator = nullptr; |
659 m_layerTreeView = nullptr; | 661 m_layerTreeView = nullptr; |
660 m_animationHost = nullptr; | 662 m_animationHost = nullptr; |
661 m_layerTreeViewClosed = true; | 663 m_layerTreeViewClosed = true; |
662 } | 664 } |
663 | 665 |
664 void WebFrameWidgetImpl::didAcquirePointerLock() { | 666 void WebFrameWidgetImpl::didAcquirePointerLock() { |
665 page()->pointerLockController().didAcquirePointerLock(); | 667 page()->pointerLockController().didAcquirePointerLock(); |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 if (m_layerTreeView && m_layerTreeView->compositorAnimationHost()) { | 991 if (m_layerTreeView && m_layerTreeView->compositorAnimationHost()) { |
990 m_animationHost = WTF::makeUnique<CompositorAnimationHost>( | 992 m_animationHost = WTF::makeUnique<CompositorAnimationHost>( |
991 m_layerTreeView->compositorAnimationHost()); | 993 m_layerTreeView->compositorAnimationHost()); |
992 } | 994 } |
993 } | 995 } |
994 | 996 |
995 if (WebDevToolsAgentImpl* devTools = m_localRoot->devToolsAgentImpl()) | 997 if (WebDevToolsAgentImpl* devTools = m_localRoot->devToolsAgentImpl()) |
996 devTools->layerTreeViewChanged(m_layerTreeView); | 998 devTools->layerTreeViewChanged(m_layerTreeView); |
997 | 999 |
998 page()->settings().setAcceleratedCompositingEnabled(m_layerTreeView); | 1000 page()->settings().setAcceleratedCompositingEnabled(m_layerTreeView); |
999 if (m_layerTreeView) | 1001 if (m_layerTreeView) { |
1000 page()->layerTreeViewInitialized(*m_layerTreeView); | 1002 page()->layerTreeViewInitialized(*m_layerTreeView, |
| 1003 m_localRoot->frame()->view()); |
| 1004 } |
1001 | 1005 |
1002 // FIXME: only unittests, click to play, Android priting, and printing (for | 1006 // FIXME: only unittests, click to play, Android priting, and printing (for |
1003 // headers and footers) make this assert necessary. We should make them not | 1007 // headers and footers) make this assert necessary. We should make them not |
1004 // hit this code and then delete allowsBrokenNullLayerTreeView. | 1008 // hit this code and then delete allowsBrokenNullLayerTreeView. |
1005 DCHECK(m_layerTreeView || !m_client || | 1009 DCHECK(m_layerTreeView || !m_client || |
1006 m_client->allowsBrokenNullLayerTreeView()); | 1010 m_client->allowsBrokenNullLayerTreeView()); |
1007 } | 1011 } |
1008 | 1012 |
1009 void WebFrameWidgetImpl::setIsAcceleratedCompositingActive(bool active) { | 1013 void WebFrameWidgetImpl::setIsAcceleratedCompositingActive(bool active) { |
1010 // In the middle of shutting down; don't try to spin back up a compositor. | 1014 // In the middle of shutting down; don't try to spin back up a compositor. |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 return nullptr; | 1136 return nullptr; |
1133 } | 1137 } |
1134 | 1138 |
1135 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { | 1139 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { |
1136 if (!m_imeAcceptEvents) | 1140 if (!m_imeAcceptEvents) |
1137 return nullptr; | 1141 return nullptr; |
1138 return focusedLocalFrameInWidget(); | 1142 return focusedLocalFrameInWidget(); |
1139 } | 1143 } |
1140 | 1144 |
1141 } // namespace blink | 1145 } // namespace blink |
OLD | NEW |