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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 1898813002: Allow throttling in painting microbenchmark (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 2298 matching lines...) Expand 10 before | Expand all | Expand 10 after
2309 bool CompositedLayerMapping::needsRepaint(const GraphicsLayer& graphicsLayer) co nst 2309 bool CompositedLayerMapping::needsRepaint(const GraphicsLayer& graphicsLayer) co nst
2310 { 2310 {
2311 return isScrollableAreaLayer(&graphicsLayer) ? true : m_owningLayer.needsRep aint(); 2311 return isScrollableAreaLayer(&graphicsLayer) ? true : m_owningLayer.needsRep aint();
2312 } 2312 }
2313 2313
2314 void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G raphicsContext& context, 2314 void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G raphicsContext& context,
2315 GraphicsLayerPaintingPhase graphicsLayerPaintingPhase, const IntRect& intere stRect) const 2315 GraphicsLayerPaintingPhase graphicsLayerPaintingPhase, const IntRect& intere stRect) const
2316 { 2316 {
2317 // https://code.google.com/p/chromium/issues/detail?id=343772 2317 // https://code.google.com/p/chromium/issues/detail?id=343772
2318 DisableCompositingQueryAsserts disabler; 2318 DisableCompositingQueryAsserts disabler;
2319 // Allow throttling to make sure no painting paths (e.g.,
2320 // ContentLayerDelegate::paintContents) try to paint throttled content.
2321 DocumentLifecycle::AllowThrottlingScope allowThrottling(m_owningLayer.layout Object()->document().lifecycle());
2319 #if ENABLE(ASSERT) 2322 #if ENABLE(ASSERT)
2320 // FIXME: once the state machine is ready, this can be removed and we can re fer to that instead. 2323 // FIXME: once the state machine is ready, this can be removed and we can re fer to that instead.
2321 if (Page* page = layoutObject()->frame()->page()) 2324 if (Page* page = layoutObject()->frame()->page())
2322 page->setIsPainting(true); 2325 page->setIsPainting(true);
2323 #endif 2326 #endif
2324 2327
2325 TRACE_EVENT1("devtools.timeline", "Paint", "data", InspectorPaintEvent::data (m_owningLayer.layoutObject(), LayoutRect(interestRect), graphicsLayer)); 2328 TRACE_EVENT1("devtools.timeline", "Paint", "data", InspectorPaintEvent::data (m_owningLayer.layoutObject(), LayoutRect(interestRect), graphicsLayer));
2326 2329
2327 PaintLayerFlags paintLayerFlags = 0; 2330 PaintLayerFlags paintLayerFlags = 0;
2328 if (graphicsLayerPaintingPhase & GraphicsLayerPaintBackground) 2331 if (graphicsLayerPaintingPhase & GraphicsLayerPaintBackground)
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
2573 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2576 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2574 name = "Scrolling Contents Layer"; 2577 name = "Scrolling Contents Layer";
2575 } else { 2578 } else {
2576 ASSERT_NOT_REACHED(); 2579 ASSERT_NOT_REACHED();
2577 } 2580 }
2578 2581
2579 return name; 2582 return name;
2580 } 2583 }
2581 2584
2582 } // namespace blink 2585 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698