OLD | NEW |
---|---|
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 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1876 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS crollEvent); | 1876 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS crollEvent); |
1877 } | 1877 } |
1878 } | 1878 } |
1879 | 1879 |
1880 if (!m_page) | 1880 if (!m_page) |
1881 return; | 1881 return; |
1882 | 1882 |
1883 // FIXME: This should probably be using the local root? | 1883 // FIXME: This should probably be using the local root? |
1884 if (m_page->mainFrame()->isLocalFrame()) | 1884 if (m_page->mainFrame()->isLocalFrame()) |
1885 PageWidgetDelegate::animate(*m_page, validFrameTime.lastFrameTimeMonoton ic, *m_page->deprecatedLocalMainFrame()); | 1885 PageWidgetDelegate::animate(*m_page, validFrameTime.lastFrameTimeMonoton ic, *m_page->deprecatedLocalMainFrame()); |
1886 | |
1887 // HACK: simulate the commit signal for layout tests | |
1888 //Platform::current()->mainThread()->postTask(FROM_HERE, bind(&WebViewImpl:: didCommitCompositorFrame, this)); | |
1886 } | 1889 } |
1887 | 1890 |
1888 void WebViewImpl::layout() | 1891 void WebViewImpl::layout() |
1889 { | 1892 { |
1890 TRACE_EVENT0("blink", "WebViewImpl::layout"); | 1893 TRACE_EVENT0("blink", "WebViewImpl::layout"); |
1891 if (!mainFrameImpl()) | 1894 if (!mainFrameImpl()) |
1892 return; | 1895 return; |
1893 | 1896 |
1894 PageWidgetDelegate::layout(*m_page, *mainFrameImpl()->frame()); | 1897 PageWidgetDelegate::layout(*m_page, *mainFrameImpl()->frame()); |
1895 updateLayerTreeBackgroundColor(); | 1898 updateLayerTreeBackgroundColor(); |
(...skipping 28 matching lines...) Expand all Loading... | |
1924 ASSERT(!isAcceleratedCompositingActive()); | 1927 ASSERT(!isAcceleratedCompositingActive()); |
1925 | 1928 |
1926 double paintStart = currentTime(); | 1929 double paintStart = currentTime(); |
1927 PageWidgetDelegate::paint(*m_page, canvas, rect, *m_page->deprecatedLocalMai nFrame()); | 1930 PageWidgetDelegate::paint(*m_page, canvas, rect, *m_page->deprecatedLocalMai nFrame()); |
1928 double paintEnd = currentTime(); | 1931 double paintEnd = currentTime(); |
1929 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart); | 1932 double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart); |
1930 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationM S", (paintEnd - paintStart) * 1000, 0, 120, 30); | 1933 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationM S", (paintEnd - paintStart) * 1000, 0, 120, 30); |
1931 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPe rSecond", pixelsPerSec / 1000000, 10, 210, 30); | 1934 Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPe rSecond", pixelsPerSec / 1000000, 10, 210, 30); |
1932 } | 1935 } |
1933 | 1936 |
1937 void WebViewImpl::didCommitCompositorFrame() | |
1938 { | |
1939 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | |
1940 return; | |
1941 FrameView* view = mainFrameImpl()->frameView(); | |
1942 view->updateThrottling(); | |
ojan
2015/09/01 19:56:48
I was picturing that this would be called uncondit
Sami
2015/09/02 10:46:03
Yeah, that was my assumption too but the problem i
ojan
2015/09/02 11:33:27
Ah right. Doing it synchronously in updateLifecycl
dglazkov
2015/09/03 16:51:28
I am still a little bit confused, please forgive m
Sami
2015/09/03 19:29:09
I just gave the PostTask approach a try since you
| |
1943 } | |
1944 | |
1934 #if OS(ANDROID) | 1945 #if OS(ANDROID) |
1935 void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& re ct) | 1946 void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& re ct) |
1936 { | 1947 { |
1937 // Note: This method exists on OS(ANDROID) and will hopefully be | 1948 // Note: This method exists on OS(ANDROID) and will hopefully be |
1938 // removed once the link disambiguation feature renders using | 1949 // removed once the link disambiguation feature renders using |
1939 // the compositor. | 1950 // the compositor. |
1940 ASSERT(isAcceleratedCompositingActive()); | 1951 ASSERT(isAcceleratedCompositingActive()); |
1941 | 1952 |
1942 PageWidgetDelegate::paintIgnoringCompositing(*m_page, canvas, rect, *m_page- >deprecatedLocalMainFrame()); | 1953 PageWidgetDelegate::paintIgnoringCompositing(*m_page, canvas, rect, *m_page- >deprecatedLocalMainFrame()); |
1943 } | 1954 } |
(...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4425 if (m_pageColorOverlay) | 4436 if (m_pageColorOverlay) |
4426 m_pageColorOverlay->update(); | 4437 m_pageColorOverlay->update(); |
4427 if (InspectorOverlayImpl* overlay = inspectorOverlay()) { | 4438 if (InspectorOverlayImpl* overlay = inspectorOverlay()) { |
4428 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); | 4439 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); |
4429 if (inspectorPageOverlay) | 4440 if (inspectorPageOverlay) |
4430 inspectorPageOverlay->update(); | 4441 inspectorPageOverlay->update(); |
4431 } | 4442 } |
4432 } | 4443 } |
4433 | 4444 |
4434 } // namespace blink | 4445 } // namespace blink |
OLD | NEW |