|
|
Chromium Code Reviews|
Created:
3 years, 9 months ago by Saman Sami Modified:
3 years, 9 months ago CC:
chromium-reviews, xjz+watch_chromium.org, jam, jbauman+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, kalyank, cc-bugs_chromium.org, danakj+watch_chromium.org, miu+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionIn an effort to simplify DelegatedFrameHost, this CL moves the code for
copying latency info from old surface to new surface to cc.
This needs to be done because the code for capturing screenshots depends
on the fact that that a particular latency info reaches cc::Display. When
resizing, the latency info can remain in the old surface which is not
drawn, and screenshot times out. A previous CL of mine had this problem
and got reverted.
BUG=696199
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
Review-Url: https://codereview.chromium.org/2721763002
Cr-Commit-Position: refs/heads/master@{#454101}
Committed: https://chromium.googlesource.com/chromium/src/+/71ca55f2b59fe14c1a803f00c2c219502fd5d9bb
Patch Set 1 #Patch Set 2 : c #Patch Set 3 : c #
Total comments: 4
Patch Set 4 : c #Patch Set 5 : c #Patch Set 6 : c #
Total comments: 1
Patch Set 7 : c #Patch Set 8 : c #Patch Set 9 : c #
Total comments: 6
Patch Set 10 : c #Patch Set 11 : c #
Total comments: 4
Patch Set 12 : c #
Messages
Total messages: 64 (45 generated)
Description was changed from ========== Test ========== to ========== Test CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
The CQ bit was checked by samans@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Test ========== to ========== Currently, DelegatedFrameHost deals with copying latency info from the old surface to the new surface on resize. This is something that cc code should handle. From now on, SetPreviousFrameSurface takes care of this. ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
Description was changed from ========== Currently, DelegatedFrameHost deals with copying latency info from the old surface to the new surface on resize. This is something that cc code should handle. From now on, SetPreviousFrameSurface takes care of this. ========== to ========== Currently, DelegatedFrameHost deals with copying latency info from the old surface to the new surface on resize. This is something that cc code should handle. From now on, SetPreviousFrameSurface takes care of this. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
The CQ bit was checked by samans@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by samans@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Currently, DelegatedFrameHost deals with copying latency info from the old surface to the new surface on resize. This is something that cc code should handle. From now on, SetPreviousFrameSurface takes care of this. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== Currently, DelegatedFrameHost deals with copying latency info from the old surface to the new surface on resize. This is something that cc code should handle. From now on, SetPreviousFrameSurface takes care of this. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
samans@chromium.org changed reviewers: + fsamuel@chromium.org, jbauman@chromium.org, tdresser@chromium.org
jbauman@: Can you please take a look since this involves DelegatedFrameHost and Surface stuff. tdresser@: fsamuel@ told me you know about latency stuff. Can you take a look please?
Please add a BUG=bugnumber.
Description was changed from ========== Currently, DelegatedFrameHost deals with copying latency info from the old surface to the new surface on resize. This is something that cc code should handle. From now on, SetPreviousFrameSurface takes care of this. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== Currently, DelegatedFrameHost deals with copying latency info from the old surface to the new surface on resize. This is something that cc code should handle. From now on, SetPreviousFrameSurface takes care of this. This needs to be done because the code for capturing screenshots depends on the fact that that a particular latency info reaches cc::Display. When resizing, the latency info can remain in the old surface which is not drawn, and screenshot times out. A previous CL of mine had this problem and got reverted. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
Description was changed from ========== Currently, DelegatedFrameHost deals with copying latency info from the old surface to the new surface on resize. This is something that cc code should handle. From now on, SetPreviousFrameSurface takes care of this. This needs to be done because the code for capturing screenshots depends on the fact that that a particular latency info reaches cc::Display. When resizing, the latency info can remain in the old surface which is not drawn, and screenshot times out. A previous CL of mine had this problem and got reverted. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== Currently, DelegatedFrameHost deals with copying latency info from the old surface to the new surface on resize. This is something that cc code should handle. From now on, SetPreviousFrameSurface takes care of this. This needs to be done because the code for capturing screenshots depends on the fact that that a particular latency info reaches cc::Display. When resizing, the latency info can remain in the old surface which is not drawn, and screenshot times out. A previous CL of mine had this problem and got reverted. BUG=696199 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
https://codereview.chromium.org/2721763002/diff/30001/content/browser/rendere... File content/browser/renderer_host/delegated_frame_host.cc (left): https://codereview.chromium.org/2721763002/diff/30001/content/browser/rendere... content/browser/renderer_host/delegated_frame_host.cc:465: frame.metadata.latency_info.clear(); I have context on LatencyInfo, but not much context on this part of the code. The CL description makes it sound like this is just a refactor, without any behavior change, but this looks like it's changing behavior. Is it? If we are changing behavior, the CL description should make it clear, and we should have a test.
On 2017/02/28 20:25:45, tdresser wrote: > https://codereview.chromium.org/2721763002/diff/30001/content/browser/rendere... > File content/browser/renderer_host/delegated_frame_host.cc (left): > > https://codereview.chromium.org/2721763002/diff/30001/content/browser/rendere... > content/browser/renderer_host/delegated_frame_host.cc:465: > frame.metadata.latency_info.clear(); > I have context on LatencyInfo, but not much context on this part of the code. > > The CL description makes it sound like this is just a refactor, without any > behavior change, but this looks like it's changing behavior. > > Is it? If we are changing behavior, the CL description should make it clear, and > we should have a test. Yes, the behavior is not exactly the same. So far only DelegatedFrameHost used to do this, but from now every client of SurfaceFactory will have its latency infos carried over to the new surface. Also, I can think of scenarios that DelegatedFrameHost would not copy latency infos but after this CL they will be. I don't know a lot about LatencyInfo, that's why we thought it'll be a good idea to ask you to comment on this change. Could this change have any unwanted side-effects? When do we want and when do we not want to copy the latency info to the new surface? If this is the right behaviour, I can write a unit test to ensure it doesn't change in the future.
Always copying the LatencyInfo should be correct.
https://codereview.chromium.org/2721763002/diff/30001/cc/surfaces/surface.cc File cc/surfaces/surface.cc (right): https://codereview.chromium.org/2721763002/diff/30001/cc/surfaces/surface.cc#... cc/surfaces/surface.cc:55: active_frame_->metadata.latency_info.insert( Also check whether active_frame_ exists for the new surface.
https://codereview.chromium.org/2721763002/diff/30001/cc/surfaces/surface.cc File cc/surfaces/surface.cc (right): https://codereview.chromium.org/2721763002/diff/30001/cc/surfaces/surface.cc#... cc/surfaces/surface.cc:55: active_frame_->metadata.latency_info.insert( On 2017/02/28 23:11:09, jbauman wrote: > Also check whether active_frame_ exists for the new surface. I actually think that we might want to place the LatencyInfo on the pending frame if there's no active frame or else it will get lost?
The CQ bit was checked by samans@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by samans@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #5 (id:70001) has been deleted
Dry run: Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by samans@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by samans@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Currently, DelegatedFrameHost deals with copying latency info from the old surface to the new surface on resize. This is something that cc code should handle. From now on, SetPreviousFrameSurface takes care of this. This needs to be done because the code for capturing screenshots depends on the fact that that a particular latency info reaches cc::Display. When resizing, the latency info can remain in the old surface which is not drawn, and screenshot times out. A previous CL of mine had this problem and got reverted. BUG=696199 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== In an effort to simplify DelegatedFrameHost, this CL moves the code for copying latency info from old surface to new surface to cc. This needs to be done because the code for capturing screenshots depends on the fact that that a particular latency info reaches cc::Display. When resizing, the latency info can remain in the old surface which is not drawn, and screenshot times out. A previous CL of mine had this problem and got reverted. BUG=696199 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
PTAL I added a unit test and also added support for pending frame.
https://codereview.chromium.org/2721763002/diff/30001/cc/surfaces/surface.cc File cc/surfaces/surface.cc (right): https://codereview.chromium.org/2721763002/diff/30001/cc/surfaces/surface.cc#... cc/surfaces/surface.cc:55: active_frame_->metadata.latency_info.insert( On 2017/02/28 23:11:09, jbauman wrote: > Also check whether active_frame_ exists for the new surface. A frame was just submitted, so either pending or active frame should exist.
https://codereview.chromium.org/2721763002/diff/60003/cc/surfaces/surface_fac... File cc/surfaces/surface_factory_unittest.cc (right): https://codereview.chromium.org/2721763002/diff/60003/cc/surfaces/surface_fac... cc/surfaces/surface_factory_unittest.cc:826: TEST_F(SurfaceFactoryTest, LatencyInfoCarriedOverOnResize) { Could you move this to compositor_frame_sink_support_unittest and verify as well that LatencyInfo doesn't get lost if we have a pending frame?
The CQ bit was checked by samans@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by samans@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
PTAL I fixed the logic for pending frames and added new unit tests.
lgtm + nits https://codereview.chromium.org/2721763002/diff/160001/cc/surfaces/compositor... File cc/surfaces/compositor_frame_sink_support_unittest.cc (right): https://codereview.chromium.org/2721763002/diff/160001/cc/surfaces/compositor... cc/surfaces/compositor_frame_sink_support_unittest.cc:773: std::move(frame2)); nit: Add an expectation that the surface has a pending frame. https://codereview.chromium.org/2721763002/diff/160001/cc/surfaces/compositor... cc/surfaces/compositor_frame_sink_support_unittest.cc:781: Surface* surface = surface_manager().GetSurfaceForId(parent_id2); ASSERT_NE(nullptr, surface)? Also, given this is the current surface, simply use parent_surface() and maybe verify the surface ID? https://codereview.chromium.org/2721763002/diff/160001/cc/surfaces/compositor... cc/surfaces/compositor_frame_sink_support_unittest.cc:831: std::move(frame2)); Verify there's a pending frame.
lgtm + nits https://codereview.chromium.org/2721763002/diff/160001/cc/surfaces/compositor... File cc/surfaces/compositor_frame_sink_support_unittest.cc (right): https://codereview.chromium.org/2721763002/diff/160001/cc/surfaces/compositor... cc/surfaces/compositor_frame_sink_support_unittest.cc:773: std::move(frame2)); nit: Add an expectation that the surface has a pending frame. https://codereview.chromium.org/2721763002/diff/160001/cc/surfaces/compositor... cc/surfaces/compositor_frame_sink_support_unittest.cc:781: Surface* surface = surface_manager().GetSurfaceForId(parent_id2); ASSERT_NE(nullptr, surface)? Also, given this is the current surface, simply use parent_surface() and maybe verify the surface ID? https://codereview.chromium.org/2721763002/diff/160001/cc/surfaces/compositor... cc/surfaces/compositor_frame_sink_support_unittest.cc:831: std::move(frame2)); Verify there's a pending frame.
The CQ bit was checked by samans@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2721763002/diff/160001/cc/surfaces/compositor... File cc/surfaces/compositor_frame_sink_support_unittest.cc (right): https://codereview.chromium.org/2721763002/diff/160001/cc/surfaces/compositor... cc/surfaces/compositor_frame_sink_support_unittest.cc:773: std::move(frame2)); On 2017/03/01 19:35:19, Fady Samuel wrote: > nit: Add an expectation that the surface has a pending frame. Done. https://codereview.chromium.org/2721763002/diff/160001/cc/surfaces/compositor... cc/surfaces/compositor_frame_sink_support_unittest.cc:781: Surface* surface = surface_manager().GetSurfaceForId(parent_id2); On 2017/03/01 19:35:19, Fady Samuel wrote: > ASSERT_NE(nullptr, surface)? Also, given this is the current surface, simply use > parent_surface() and maybe verify the surface ID? I prefer the assert. https://codereview.chromium.org/2721763002/diff/160001/cc/surfaces/compositor... cc/surfaces/compositor_frame_sink_support_unittest.cc:831: std::move(frame2)); On 2017/03/01 19:35:19, Fady Samuel wrote: > Verify there's a pending frame. I do it below.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm with one nit. https://codereview.chromium.org/2721763002/diff/200001/cc/surfaces/surface.h File cc/surfaces/surface.h (right): https://codereview.chromium.org/2721763002/diff/200001/cc/surfaces/surface.h#... cc/surfaces/surface.h:137: void TakeLatencyInfoFromFrame(CompositorFrame* frame, Make this static.
https://codereview.chromium.org/2721763002/diff/200001/cc/surfaces/surface.cc File cc/surfaces/surface.cc (right): https://codereview.chromium.org/2721763002/diff/200001/cc/surfaces/surface.cc... cc/surfaces/surface.cc:272: void Surface::TakeLatencyInfo(std::vector<ui::LatencyInfo>* latency_info) { nit: TakeLatencyInfoFromActiveFrame?
The CQ bit was checked by samans@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2721763002/diff/200001/cc/surfaces/surface.cc File cc/surfaces/surface.cc (right): https://codereview.chromium.org/2721763002/diff/200001/cc/surfaces/surface.cc... cc/surfaces/surface.cc:272: void Surface::TakeLatencyInfo(std::vector<ui::LatencyInfo>* latency_info) { On 2017/03/01 22:17:43, Fady Samuel wrote: > nit: TakeLatencyInfoFromActiveFrame? We're gonna leave this for another CL as we discussed. https://codereview.chromium.org/2721763002/diff/200001/cc/surfaces/surface.h File cc/surfaces/surface.h (right): https://codereview.chromium.org/2721763002/diff/200001/cc/surfaces/surface.h#... cc/surfaces/surface.h:137: void TakeLatencyInfoFromFrame(CompositorFrame* frame, On 2017/03/01 22:11:08, jbauman wrote: > Make this static. Done.
The CQ bit was unchecked by samans@chromium.org
The CQ bit was checked by samans@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from fsamuel@chromium.org, jbauman@chromium.org Link to the patchset: https://codereview.chromium.org/2721763002/#ps220001 (title: "c")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 220001, "attempt_start_ts": 1488411671069670,
"parent_rev": "0a07691703b543c6c6f2652b708fb18c86f0f617", "commit_rev":
"71ca55f2b59fe14c1a803f00c2c219502fd5d9bb"}
Message was sent while issue was closed.
Description was changed from ========== In an effort to simplify DelegatedFrameHost, this CL moves the code for copying latency info from old surface to new surface to cc. This needs to be done because the code for capturing screenshots depends on the fact that that a particular latency info reaches cc::Display. When resizing, the latency info can remain in the old surface which is not drawn, and screenshot times out. A previous CL of mine had this problem and got reverted. BUG=696199 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== In an effort to simplify DelegatedFrameHost, this CL moves the code for copying latency info from old surface to new surface to cc. This needs to be done because the code for capturing screenshots depends on the fact that that a particular latency info reaches cc::Display. When resizing, the latency info can remain in the old surface which is not drawn, and screenshot times out. A previous CL of mine had this problem and got reverted. BUG=696199 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2721763002 Cr-Commit-Position: refs/heads/master@{#454101} Committed: https://chromium.googlesource.com/chromium/src/+/71ca55f2b59fe14c1a803f00c2c2... ==========
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as https://chromium.googlesource.com/chromium/src/+/71ca55f2b59fe14c1a803f00c2c2... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
