OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/delegated_frame_host.h" | 5 #include "content/browser/renderer_host/delegated_frame_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 } | 772 } |
773 | 773 |
774 //////////////////////////////////////////////////////////////////////////////// | 774 //////////////////////////////////////////////////////////////////////////////// |
775 // DelegatedFrameHost, private: | 775 // DelegatedFrameHost, private: |
776 | 776 |
777 DelegatedFrameHost::~DelegatedFrameHost() { | 777 DelegatedFrameHost::~DelegatedFrameHost() { |
778 DCHECK(!compositor_); | 778 DCHECK(!compositor_); |
779 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | 779 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); |
780 factory->GetContextFactory()->RemoveObserver(this); | 780 factory->GetContextFactory()->RemoveObserver(this); |
781 | 781 |
| 782 // If a swap ACK was pending, it must be sent (see https://crbug.com/705548). |
| 783 if (support_) |
| 784 support_->RunDrawCallbacks(); |
| 785 |
782 ResetCompositorFrameSinkSupport(); | 786 ResetCompositorFrameSinkSupport(); |
783 | 787 |
784 factory->GetContextFactoryPrivate() | 788 factory->GetContextFactoryPrivate() |
785 ->GetSurfaceManager() | 789 ->GetSurfaceManager() |
786 ->InvalidateFrameSinkId(frame_sink_id_); | 790 ->InvalidateFrameSinkId(frame_sink_id_); |
787 | 791 |
788 DCHECK(!vsync_manager_.get()); | 792 DCHECK(!vsync_manager_.get()); |
789 } | 793 } |
790 | 794 |
791 void DelegatedFrameHost::SetCompositor(ui::Compositor* compositor) { | 795 void DelegatedFrameHost::SetCompositor(ui::Compositor* compositor) { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 } | 878 } |
875 | 879 |
876 if (!skipped_frames_) { | 880 if (!skipped_frames_) { |
877 latest_confirmed_begin_frame_source_id_ = ack.source_id; | 881 latest_confirmed_begin_frame_source_id_ = ack.source_id; |
878 latest_confirmed_begin_frame_sequence_number_ = | 882 latest_confirmed_begin_frame_sequence_number_ = |
879 ack.latest_confirmed_sequence_number; | 883 ack.latest_confirmed_sequence_number; |
880 } | 884 } |
881 } | 885 } |
882 | 886 |
883 } // namespace content | 887 } // namespace content |
OLD | NEW |