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

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

Issue 206243003: Simplify CompositingReasonFinder::requiresCompositingForFrame (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/core/rendering/compositing/CompositingReasonFinder.cpp ('k') | 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 , m_isTrackingRepaints(false) 212 , m_isTrackingRepaints(false)
213 , m_rootLayerAttachment(RootLayerUnattached) 213 , m_rootLayerAttachment(RootLayerUnattached)
214 { 214 {
215 } 215 }
216 216
217 RenderLayerCompositor::~RenderLayerCompositor() 217 RenderLayerCompositor::~RenderLayerCompositor()
218 { 218 {
219 ASSERT(m_rootLayerAttachment == RootLayerUnattached); 219 ASSERT(m_rootLayerAttachment == RootLayerUnattached);
220 } 220 }
221 221
222 void RenderLayerCompositor::enableCompositingMode(bool enable /* = true */) 222 void RenderLayerCompositor::enableCompositingMode(bool enable)
223 { 223 {
224 if (enable != m_compositing) { 224 if (enable == m_compositing)
225 m_compositing = enable; 225 return;
226 226
227 if (m_compositing) { 227 m_compositing = enable;
228 ensureRootLayer(); 228
229 notifyIFramesOfCompositingChange(); 229 if (m_compositing)
230 } else 230 ensureRootLayer();
231 destroyRootLayer(); 231 else
232 } 232 destroyRootLayer();
233
234 notifyIFramesOfCompositingChange();
233 } 235 }
234 236
235 void RenderLayerCompositor::cacheAcceleratedCompositingFlags() 237 void RenderLayerCompositor::cacheAcceleratedCompositingFlags()
236 { 238 {
237 bool hasAcceleratedCompositing = false; 239 bool hasAcceleratedCompositing = false;
238 bool showRepaintCounter = false; 240 bool showRepaintCounter = false;
239 bool forceCompositingMode = false; 241 bool forceCompositingMode = false;
240 242
241 if (Settings* settings = m_renderView.document().settings()) { 243 if (Settings* settings = m_renderView.document().settings()) {
242 hasAcceleratedCompositing = settings->acceleratedCompositingEnabled(); 244 hasAcceleratedCompositing = settings->acceleratedCompositingEnabled();
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after
2240 } else if (graphicsLayer == m_scrollLayer.get()) { 2242 } else if (graphicsLayer == m_scrollLayer.get()) {
2241 name = "LocalFrame Scrolling Layer"; 2243 name = "LocalFrame Scrolling Layer";
2242 } else { 2244 } else {
2243 ASSERT_NOT_REACHED(); 2245 ASSERT_NOT_REACHED();
2244 } 2246 }
2245 2247
2246 return name; 2248 return name;
2247 } 2249 }
2248 2250
2249 } // namespace WebCore 2251 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/CompositingReasonFinder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698