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

Side by Side Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 235093005: Minor cleanup to RenderLayerCompositor::cacheAcceleratedCompositingFlags (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | 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) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 notifyIFramesOfCompositingChange(); 144 notifyIFramesOfCompositingChange();
145 } 145 }
146 146
147 void RenderLayerCompositor::cacheAcceleratedCompositingFlags() 147 void RenderLayerCompositor::cacheAcceleratedCompositingFlags()
148 { 148 {
149 bool hasAcceleratedCompositing = false; 149 bool hasAcceleratedCompositing = false;
150 bool showRepaintCounter = false; 150 bool showRepaintCounter = false;
151 bool forceCompositingMode = false; 151 bool forceCompositingMode = false;
152 152
153 if (Settings* settings = m_renderView.document().settings()) { 153 if (Settings* settings = m_renderView.document().settings()) {
154 hasAcceleratedCompositing = settings->acceleratedCompositingEnabled(); 154 if (settings->acceleratedCompositingEnabled()) {
155
156 // We allow the chrome to override the settings, in case the page is ren dered
157 // on a chrome that doesn't allow accelerated compositing.
158 if (hasAcceleratedCompositing) {
159 m_compositingReasonFinder.updateTriggers(); 155 m_compositingReasonFinder.updateTriggers();
160 hasAcceleratedCompositing = m_compositingReasonFinder.hasTriggers(); 156 hasAcceleratedCompositing = m_compositingReasonFinder.hasTriggers();
161 } 157 }
162 158
163 showRepaintCounter = settings->showRepaintCounter(); 159 showRepaintCounter = settings->showRepaintCounter();
164 forceCompositingMode = settings->forceCompositingMode() && hasAccelerate dCompositing; 160 forceCompositingMode = settings->forceCompositingMode() && hasAccelerate dCompositing;
165 161
166 if (forceCompositingMode && !isMainFrame()) 162 if (forceCompositingMode && !isMainFrame())
167 forceCompositingMode = m_compositingReasonFinder.requiresCompositing ForScrollableFrame(); 163 forceCompositingMode = m_compositingReasonFinder.requiresCompositing ForScrollableFrame();
168 } 164 }
(...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 } else if (graphicsLayer == m_scrollLayer.get()) { 1694 } else if (graphicsLayer == m_scrollLayer.get()) {
1699 name = "LocalFrame Scrolling Layer"; 1695 name = "LocalFrame Scrolling Layer";
1700 } else { 1696 } else {
1701 ASSERT_NOT_REACHED(); 1697 ASSERT_NOT_REACHED();
1702 } 1698 }
1703 1699
1704 return name; 1700 return name;
1705 } 1701 }
1706 1702
1707 } // namespace WebCore 1703 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698