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

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

Issue 20103002: Make composited scrolling codepaths co-operate. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: UMA + bug Created 7 years, 3 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
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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 if (!m_needsUpdateCompositingRequirementsState) 328 if (!m_needsUpdateCompositingRequirementsState)
329 return; 329 return;
330 330
331 TRACE_EVENT0("blink_rendering,comp-scroll", "RenderLayerCompositor::updateCo mpositingRequirementsState"); 331 TRACE_EVENT0("blink_rendering,comp-scroll", "RenderLayerCompositor::updateCo mpositingRequirementsState");
332 332
333 m_needsUpdateCompositingRequirementsState = false; 333 m_needsUpdateCompositingRequirementsState = false;
334 334
335 if (!rootRenderLayer() || !rootRenderLayer()->acceleratedCompositingForOverf lowScrollEnabled()) 335 if (!rootRenderLayer() || !rootRenderLayer()->acceleratedCompositingForOverf lowScrollEnabled())
336 return; 336 return;
337 337
338 const bool compositorDrivenAcceleratedScrollingEnabled = rootRenderLayer()-> compositorDrivenAcceleratedScrollingEnabled();
339
340 const FrameView::ScrollableAreaSet* scrollableAreas = m_renderView->frameVie w()->scrollableAreas();
341 if (!compositorDrivenAcceleratedScrollingEnabled && !scrollableAreas)
342 return;
343
344 for (HashSet<RenderLayer*>::iterator it = m_outOfFlowPositionedLayers.begin( ); it != m_outOfFlowPositionedLayers.end(); ++it) 338 for (HashSet<RenderLayer*>::iterator it = m_outOfFlowPositionedLayers.begin( ); it != m_outOfFlowPositionedLayers.end(); ++it)
345 (*it)->updateHasUnclippedDescendant(); 339 (*it)->updateHasUnclippedDescendant();
346 340
347 if (!compositorDrivenAcceleratedScrollingEnabled) { 341 const FrameView::ScrollableAreaSet* scrollableAreas = m_renderView->frameVie w()->scrollableAreas();
348 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas->begin( ); it != scrollableAreas->end(); ++it) 342 if (!scrollableAreas)
349 (*it)->updateNeedsCompositedScrolling(); 343 return;
350 } 344
345 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas->begin(); i t != scrollableAreas->end(); ++it)
346 (*it)->updateNeedsCompositedScrolling();
351 } 347 }
352 348
353 void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update Type, RenderLayer* updateRoot) 349 void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update Type, RenderLayer* updateRoot)
354 { 350 {
355 // Avoid updating the layers with old values. Compositing layers will be upd ated after the layout is finished. 351 // Avoid updating the layers with old values. Compositing layers will be upd ated after the layout is finished.
356 if (m_renderView->needsLayout()) 352 if (m_renderView->needsLayout())
357 return; 353 return;
358 354
359 if (m_forceCompositingMode && !m_compositing) 355 if (m_forceCompositingMode && !m_compositing)
360 enableCompositingMode(true); 356 enableCompositingMode(true);
(...skipping 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after
2767 } else if (graphicsLayer == m_scrollLayer.get()) { 2763 } else if (graphicsLayer == m_scrollLayer.get()) {
2768 name = "Frame Scrolling Layer"; 2764 name = "Frame Scrolling Layer";
2769 } else { 2765 } else {
2770 ASSERT_NOT_REACHED(); 2766 ASSERT_NOT_REACHED();
2771 } 2767 }
2772 2768
2773 return name; 2769 return name;
2774 } 2770 }
2775 2771
2776 } // namespace WebCore 2772 } // namespace WebCore
OLDNEW
« Source/core/rendering/RenderLayer.cpp ('K') | « Source/core/rendering/RenderLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698