Commit 51fc7449 authored by Fady Samuel's avatar Fady Samuel Committed by Commit Bot

Reland "Reland "Surface synchronization: Add a diagnostic CHECK in ClientLayerTreeFrameSink""

This reverts commit 79605d54.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Reland "Surface synchronization: Add a diagnostic CHECK in ClientLayerTreeFrameSink""
> 
> This reverts commit 79edda64.
> 
> Reason for revert: We have branched into M68.
> 
> Original change's description:
> > Reland "Surface synchronization: Add a diagnostic CHECK in ClientLayerTreeFrameSink"
> > 
> > This is a reland of 119455cb
> > 
> > Original change's description:
> > > Surface synchronization: Add a diagnostic CHECK in ClientLayerTreeFrameSink
> > >
> > > There's a race in cc somewhere from commit to draw. I don't know exactly
> > > how to repro the race yet even though I have a high probably fix. This
> > > CL is intended to catch the race in the wild and produce a stack trace
> > > in a crash log. Hopefully from there we can acertain repro steps.
> > >
> > > Once repo steps are produced locally (either via user interaction or
> > > unit test) then this CL will be reverted.
> > >
> > > Bug: 672962
> > > Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
> > > Change-Id: I3bce066591e15d5c3aac7d4c8685dce411e284b7
> > > Reviewed-on: https://chromium-review.googlesource.com/973987
> > > Reviewed-by: Saman Sami <samans@chromium.org>
> > > Commit-Queue: Fady Samuel <fsamuel@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#544834}
> > 
> > Bug: 672962
> > TBR: samans@chromium.org
> > Change-Id: I880540f3f00c419efb4055007787e86f4722d675
> > Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
> > Reviewed-on: https://chromium-review.googlesource.com/981154
> > Commit-Queue: Fady Samuel <fsamuel@chromium.org>
> > Reviewed-by: Fady Samuel <fsamuel@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#545994}
> 
> TBR=fsamuel@chromium.org,samans@chromium.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: 672962
> Change-Id: I02cc346dddda60a02e9233ec6fcb7c9df50e1d8a
> Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
> Reviewed-on: https://chromium-review.googlesource.com/1008610
> Reviewed-by: Fady Samuel <fsamuel@chromium.org>
> Commit-Queue: Fady Samuel <fsamuel@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#550171}

TBR=fsamuel@chromium.org,samans@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 672962
Change-Id: Ib3730fc78117cbaac36d141bfe03430a665bb3ea
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/1012785Reviewed-by: default avatarFady Samuel <fsamuel@chromium.org>
Commit-Queue: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551150}
parent 475b4f6d
......@@ -133,6 +133,10 @@ void ClientLayerTreeFrameSink::SubmitCompositorFrame(CompositorFrame frame) {
if (!enable_surface_synchronization_) {
local_surface_id_ =
local_surface_id_provider_->GetLocalSurfaceIdForFrame(frame);
} else {
CHECK(local_surface_id_ != last_submitted_local_surface_id_ ||
(last_submitted_device_scale_factor_ == frame.device_scale_factor() &&
last_submitted_size_in_pixels_ == frame.size_in_pixels()));
}
TRACE_EVENT_FLOW_BEGIN0(TRACE_DISABLED_BY_DEFAULT("cc.debug.ipc"),
......@@ -145,6 +149,10 @@ void ClientLayerTreeFrameSink::SubmitCompositorFrame(CompositorFrame frame) {
if (hit_test_data_provider_)
hit_test_region_list = hit_test_data_provider_->GetHitTestData(frame);
last_submitted_local_surface_id_ = local_surface_id_;
last_submitted_device_scale_factor_ = frame.device_scale_factor();
last_submitted_size_in_pixels_ = frame.size_in_pixels();
compositor_frame_sink_ptr_->SubmitCompositorFrame(
local_surface_id_, std::move(frame), std::move(hit_test_region_list),
tracing_enabled ? base::TimeTicks::Now().since_origin().InMicroseconds()
......
......@@ -128,6 +128,10 @@ class VIZ_CLIENT_EXPORT ClientLayerTreeFrameSink
const bool enable_surface_synchronization_;
const bool wants_animate_only_begin_frames_;
LocalSurfaceId last_submitted_local_surface_id_;
float last_submitted_device_scale_factor_ = 1.f;
gfx::Size last_submitted_size_in_pixels_;
base::WeakPtrFactory<ClientLayerTreeFrameSink> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(ClientLayerTreeFrameSink);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment