4c5eea3c73e90b11bc17679d6b0943813e4c5038

SurfaceViewRenderer currently stores widthSpec/heightSpec internally, and triggers requestLayout() from renderFrameOnRenderThread()->checkConsistentLayout() when it detects a change using widthSpec/heightSpec. This is not reliable, because onMeasure() might be called several times during the layout process negotiation. For example it might look like this: -> onMeasure(at most 1920, at most 1080) <- setMeasuredDimension(1080, 1080) -> onMeasure(exactly 1080, exactly 1080) <- setMeasuredDimension(1080, 1080) Then we store (exactly 1080, exactly 1080) even though we are allowed to be bigger than this, and requestLayout() will never be triggered. This CL moves the requestLayout() trigger to updateFrameDimensionsAndReportEvents() when the frame size changes. Other small changes in this CL are: * Replace with/height variables with Point. * Add logging in updateFrameDimensionsAndReportEvents() even when rendererEvents is null. * Use Math.round() in RendererCommon.getDisplaySize() instead of integer cast. R=hbos@webrtc.org Review URL: https://codereview.webrtc.org/1453413005 . Cr-Commit-Position: refs/heads/master@{#10774}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others. This page is maintained by the Google Chrome team.
Development
See http://www.webrtc.org/native-code/development for instructions on how to get started developing with the native code.
More info
- Official web site: http://www.webrtc.org
- Master source code repo: https://chromium.googlesource.com/external/webrtc
- Samples and reference apps: https://github.com/webrtc
- Mailing list: http://groups.google.com/group/discuss-webrtc
- Continuous build: http://build.chromium.org/p/client.webrtc
Description
Languages
C++
88.6%
C
3.3%
Java
3%
Objective-C++
1.9%
Python
1.9%
Other
1%