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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 1246173002: Throttle rendering pipeline for invisible iframes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add layout tests. 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 double paintStart = currentTime(); 1932 double paintStart = currentTime();
1933 PageWidgetDelegate::paint(*m_page, canvas, rect, *m_page->deprecatedLocalMai nFrame()); 1933 PageWidgetDelegate::paint(*m_page, canvas, rect, *m_page->deprecatedLocalMai nFrame());
1934 double paintEnd = currentTime(); 1934 double paintEnd = currentTime();
1935 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart); 1935 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart);
1936 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationM S", (paintEnd - paintStart) * 1000, 0, 120, 30); 1936 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationM S", (paintEnd - paintStart) * 1000, 0, 120, 30);
1937 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPe rSecond", pixelsPerSec / 1000000, 10, 210, 30); 1937 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPe rSecond", pixelsPerSec / 1000000, 10, 210, 30);
1938 } 1938 }
1939 1939
1940 void WebViewImpl::didCommitCompositorFrame() 1940 void WebViewImpl::didCommitCompositorFrame()
1941 { 1941 {
1942 // TODO(skyostil): Update the throttling status of all frames in the tree. 1942 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
1943 return;
1944 FrameView* view = mainFrameImpl()->frameView();
1945 view->updateThrottling();
1943 } 1946 }
1944 1947
1945 #if OS(ANDROID) 1948 #if OS(ANDROID)
1946 void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& re ct) 1949 void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& re ct)
1947 { 1950 {
1948 // Note: This method exists on OS(ANDROID) and will hopefully be 1951 // Note: This method exists on OS(ANDROID) and will hopefully be
1949 // removed once the link disambiguation feature renders using 1952 // removed once the link disambiguation feature renders using
1950 // the compositor. 1953 // the compositor.
1951 ASSERT(isAcceleratedCompositingActive()); 1954 ASSERT(isAcceleratedCompositingActive());
1952 1955
(...skipping 2492 matching lines...) Expand 10 before | Expand all | Expand 10 after
4445 if (m_pageColorOverlay) 4448 if (m_pageColorOverlay)
4446 m_pageColorOverlay->update(); 4449 m_pageColorOverlay->update();
4447 if (InspectorOverlayImpl* overlay = inspectorOverlay()) { 4450 if (InspectorOverlayImpl* overlay = inspectorOverlay()) {
4448 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); 4451 PageOverlay* inspectorPageOverlay = overlay->pageOverlay();
4449 if (inspectorPageOverlay) 4452 if (inspectorPageOverlay)
4450 inspectorPageOverlay->update(); 4453 inspectorPageOverlay->update();
4451 } 4454 }
4452 } 4455 }
4453 4456
4454 } // namespace blink 4457 } // namespace blink
OLDNEW
« Source/core/frame/FrameViewTest.cpp ('K') | « Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698