Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 3789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3800 m_client->scheduleAnimation(); | 3800 m_client->scheduleAnimation(); |
| 3801 } | 3801 } |
| 3802 | 3802 |
| 3803 void WebViewImpl::setIsAcceleratedCompositingActive(bool active) | 3803 void WebViewImpl::setIsAcceleratedCompositingActive(bool active) |
| 3804 { | 3804 { |
| 3805 blink::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompos itingActive", active * 2 + m_isAcceleratedCompositingActive, 4); | 3805 blink::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompos itingActive", active * 2 + m_isAcceleratedCompositingActive, 4); |
| 3806 | 3806 |
| 3807 if (m_isAcceleratedCompositingActive == active) | 3807 if (m_isAcceleratedCompositingActive == active) |
| 3808 return; | 3808 return; |
| 3809 | 3809 |
| 3810 if (!m_client) | |
|
enne (OOO)
2014/05/15 19:29:21
Other parts of WebViewImpl are robust to a missing
| |
| 3811 return; | |
| 3812 | |
| 3810 if (!active) { | 3813 if (!active) { |
| 3811 m_isAcceleratedCompositingActive = false; | 3814 m_isAcceleratedCompositingActive = false; |
| 3812 // We need to finish all GL rendering before sending didDeactivateCompos itor() to prevent | 3815 // We need to finish all GL rendering before sending didDeactivateCompos itor() to prevent |
| 3813 // flickering when compositing turns off. This is only necessary if we'r e not in | 3816 // flickering when compositing turns off. This is only necessary if we'r e not in |
| 3814 // force-compositing-mode. | 3817 // force-compositing-mode. |
| 3815 if (m_layerTreeView && !page()->settings().forceCompositingMode()) | 3818 if (m_layerTreeView && !page()->settings().forceCompositingMode()) |
| 3816 m_layerTreeView->finishAllRendering(); | 3819 m_layerTreeView->finishAllRendering(); |
| 3817 m_client->didDeactivateCompositor(); | 3820 m_client->didDeactivateCompositor(); |
| 3818 if (!m_layerTreeViewCommitsDeferred | 3821 if (!m_layerTreeViewCommitsDeferred |
| 3819 && blink::Platform::current()->isThreadedCompositingEnabled()) { | 3822 && blink::Platform::current()->isThreadedCompositingEnabled()) { |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4064 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); | 4067 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); |
| 4065 | 4068 |
| 4066 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4069 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4067 return false; | 4070 return false; |
| 4068 | 4071 |
| 4069 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4072 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4070 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4073 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
| 4071 } | 4074 } |
| 4072 | 4075 |
| 4073 } // namespace blink | 4076 } // namespace blink |
| OLD | NEW |