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

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

Issue 14741004: NOT FOR REVIEW - Update comp-scrolling state at a well defined point in the pipeline. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 , m_hasAcceleratedCompositing(true) 211 , m_hasAcceleratedCompositing(true)
212 , m_compositingTriggers(static_cast<ChromeClient::CompositingTriggerFlags>(C hromeClient::AllTriggers)) 212 , m_compositingTriggers(static_cast<ChromeClient::CompositingTriggerFlags>(C hromeClient::AllTriggers))
213 , m_compositedLayerCount(0) 213 , m_compositedLayerCount(0)
214 , m_showDebugBorders(false) 214 , m_showDebugBorders(false)
215 , m_showRepaintCounter(false) 215 , m_showRepaintCounter(false)
216 , m_reevaluateCompositingAfterLayout(false) 216 , m_reevaluateCompositingAfterLayout(false)
217 , m_compositing(false) 217 , m_compositing(false)
218 , m_compositingLayersNeedRebuild(false) 218 , m_compositingLayersNeedRebuild(false)
219 , m_forceCompositingMode(false) 219 , m_forceCompositingMode(false)
220 , m_inPostLayoutUpdate(false) 220 , m_inPostLayoutUpdate(false)
221 , m_needsUpdateCompositingRequirementsState(false)
221 , m_isTrackingRepaints(false) 222 , m_isTrackingRepaints(false)
222 , m_rootLayerAttachment(RootLayerUnattached) 223 , m_rootLayerAttachment(RootLayerUnattached)
223 #if !LOG_DISABLED 224 #if !LOG_DISABLED
224 , m_rootLayerUpdateCount(0) 225 , m_rootLayerUpdateCount(0)
225 , m_obligateCompositedLayerCount(0) 226 , m_obligateCompositedLayerCount(0)
226 , m_secondaryCompositedLayerCount(0) 227 , m_secondaryCompositedLayerCount(0)
227 , m_obligatoryBackingStoreBytes(0) 228 , m_obligatoryBackingStoreBytes(0)
228 , m_secondaryBackingStoreBytes(0) 229 , m_secondaryBackingStoreBytes(0)
229 #endif 230 #endif
230 { 231 {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 if (Page* page = this->page()) 324 if (Page* page = this->page())
324 page->chrome()->client()->scheduleCompositingLayerFlush(); 325 page->chrome()->client()->scheduleCompositingLayerFlush();
325 } 326 }
326 } 327 }
327 328
328 bool RenderLayerCompositor::hasAnyAdditionalCompositedLayers(const RenderLayer* rootLayer) const 329 bool RenderLayerCompositor::hasAnyAdditionalCompositedLayers(const RenderLayer* rootLayer) const
329 { 330 {
330 return m_compositedLayerCount > (rootLayer->isComposited() ? 1 : 0); 331 return m_compositedLayerCount > (rootLayer->isComposited() ? 1 : 0);
331 } 332 }
332 333
334 void RenderLayerCompositor::updateCompositingRequirementsState(RenderLayer* upda teRoot)
hartmanng 2013/05/01 20:25:07 I feel like updateDescendantDependentFlags should
Ian Vollick 2013/05/02 03:24:50 Done.
335 {
336 TRACE_EVENT0("blink-rendering", "RenderLayerCompositor::updateCompositingReq uirementsState\n");
337
338 if (!m_needsUpdateCompositingRequirementsState)
339 return;
340
341 if (!updateRoot) {
342 updateRoot = rootRenderLayer();
343 updateRoot->updateHasOutOfFlowPositionedDescendant();
hartmanng 2013/05/01 20:25:07 why do we only update this inside the if block?
Ian Vollick 2013/05/02 03:24:50 That call is recursive, so I only want to call it
344 }
345
346 updateRoot->updateNeedsCompositedScrolling();
347
348 // In this function we update state that determines whether layers are
349 // stacking containers. We may therefore not use this concept here. Instead,
350 // we'll iterate through the tree topologically.
351 for (RenderLayer* child = updateRoot->firstChild(); child; child = child->ne xtSibling()) {
352 #ifndef NDEBUG
353 fprintf(stderr, "vollick: RenderLayerCompositor::updateCompositingRequir ementsState\n");
354 #endif
355 updateCompositingRequirementsState(child);
356 }
357
358 m_needsUpdateCompositingRequirementsState = false;
359 }
360
333 void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update Type, RenderLayer* updateRoot) 361 void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update Type, RenderLayer* updateRoot)
334 { 362 {
335 // Avoid updating the layers with old values. Compositing layers will be upd ated after the layout is finished. 363 // Avoid updating the layers with old values. Compositing layers will be upd ated after the layout is finished.
336 if (m_renderView->needsLayout()) 364 if (m_renderView->needsLayout())
337 return; 365 return;
338 366
339 if (m_forceCompositingMode && !m_compositing) 367 if (m_forceCompositingMode && !m_compositing)
340 enableCompositingMode(true); 368 enableCompositingMode(true);
341 369
342 if (!m_reevaluateCompositingAfterLayout && !m_compositing) 370 if (!m_reevaluateCompositingAfterLayout && !m_compositing)
(...skipping 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after
2758 info.addMember(m_layerForScrollCorner, "layerForScrollCorner"); 2786 info.addMember(m_layerForScrollCorner, "layerForScrollCorner");
2759 #if ENABLE(RUBBER_BANDING) 2787 #if ENABLE(RUBBER_BANDING)
2760 info.addMember(m_layerForOverhangAreas, "layerForOverhangAreas"); 2788 info.addMember(m_layerForOverhangAreas, "layerForOverhangAreas");
2761 info.addMember(m_contentShadowLayer, "contentShadowLayer"); 2789 info.addMember(m_contentShadowLayer, "contentShadowLayer");
2762 info.addMember(m_layerForTopOverhangArea, "layerForTopOverhangArea"); 2790 info.addMember(m_layerForTopOverhangArea, "layerForTopOverhangArea");
2763 info.addMember(m_layerForBottomOverhangArea, "layerForBottomOverhangArea"); 2791 info.addMember(m_layerForBottomOverhangArea, "layerForBottomOverhangArea");
2764 #endif 2792 #endif
2765 } 2793 }
2766 2794
2767 } // namespace WebCore 2795 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698