Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 261143003: Change default force composite setting to true (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix crashes due to missing client Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/WebSharedWorkerImpl.cpp ('k') | Source/web/tests/FrameLoaderClientImplTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/web/WebSharedWorkerImpl.cpp ('k') | Source/web/tests/FrameLoaderClientImplTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698