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

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 1329853004: Include viewport visibility checks for autoplay experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@autoplay_step1
Patch Set: rebased. Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 paintForSlimmingPaintV2(interestRect); 2452 paintForSlimmingPaintV2(interestRect);
2453 compositeForSlimmingPaintV2(); 2453 compositeForSlimmingPaintV2();
2454 } 2454 }
2455 2455
2456 if (RuntimeEnabledFeatures::frameTimingSupportEnabled()) 2456 if (RuntimeEnabledFeatures::frameTimingSupportEnabled())
2457 updateFrameTimingRequestsIfNeeded(); 2457 updateFrameTimingRequestsIfNeeded();
2458 2458
2459 ASSERT(!view->hasPendingSelection()); 2459 ASSERT(!view->hasPendingSelection());
2460 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationCl ean 2460 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationCl ean
2461 || (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && lifecycl e().state() == DocumentLifecycle::CompositingForSlimmingPaintV2Clean)); 2461 || (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && lifecycl e().state() == DocumentLifecycle::CompositingForSlimmingPaintV2Clean));
2462
2463 // Temporary callback for crbug.com/487345,402044
2464 // TODO(ojan): Make this more general to be used by PositionObserver
2465 // and rAF throttling.
2466 view->sendMediaPositionChangeNotifications();
2462 } 2467 }
2463 } 2468 }
2464 } 2469 }
2465 2470
2466 void FrameView::paintForSlimmingPaintV2(const LayoutRect& interestRect) 2471 void FrameView::paintForSlimmingPaintV2(const LayoutRect& interestRect)
2467 { 2472 {
2468 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 2473 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
2469 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF rame())); 2474 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF rame()));
2470 2475
2471 LayoutView* view = layoutView(); 2476 LayoutView* view = layoutView();
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
3925 3930
3926 if (!graphicsLayer) 3931 if (!graphicsLayer)
3927 return; 3932 return;
3928 3933
3929 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); 3934 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect);
3930 3935
3931 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); 3936 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect)));
3932 } 3937 }
3933 3938
3934 } // namespace blink 3939 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698