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

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: Rebase 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 3800 matching lines...) Expand 10 before | Expand all | Expand 10 after
3811 m_client->scheduleAnimation(); 3811 m_client->scheduleAnimation();
3812 } 3812 }
3813 3813
3814 void WebViewImpl::setIsAcceleratedCompositingActive(bool active) 3814 void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
3815 { 3815 {
3816 blink::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompos itingActive", active * 2 + m_isAcceleratedCompositingActive, 4); 3816 blink::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompos itingActive", active * 2 + m_isAcceleratedCompositingActive, 4);
3817 3817
3818 if (m_isAcceleratedCompositingActive == active) 3818 if (m_isAcceleratedCompositingActive == active)
3819 return; 3819 return;
3820 3820
3821 if (!m_client)
3822 return;
3823
3821 if (!active) { 3824 if (!active) {
3822 m_isAcceleratedCompositingActive = false; 3825 m_isAcceleratedCompositingActive = false;
3823 // We need to finish all GL rendering before sending didDeactivateCompos itor() to prevent 3826 // We need to finish all GL rendering before sending didDeactivateCompos itor() to prevent
3824 // flickering when compositing turns off. This is only necessary if we'r e not in 3827 // flickering when compositing turns off. This is only necessary if we'r e not in
3825 // force-compositing-mode. 3828 // force-compositing-mode.
3826 if (m_layerTreeView && !page()->settings().forceCompositingMode()) 3829 if (m_layerTreeView && !page()->settings().forceCompositingMode())
3827 m_layerTreeView->finishAllRendering(); 3830 m_layerTreeView->finishAllRendering();
3828 m_client->didDeactivateCompositor(); 3831 m_client->didDeactivateCompositor();
3829 if (!m_layerTreeViewCommitsDeferred 3832 if (!m_layerTreeViewCommitsDeferred
3830 && blink::Platform::current()->isThreadedCompositingEnabled()) { 3833 && blink::Platform::current()->isThreadedCompositingEnabled()) {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
4075 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4078 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4076 4079
4077 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4080 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4078 return false; 4081 return false;
4079 4082
4080 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4083 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4081 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4084 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4082 } 4085 }
4083 4086
4084 } // namespace blink 4087 } // 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