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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 } | 514 } |
515 | 515 |
516 void DelegatedFrameHost::OnBeginFrame(const cc::BeginFrameArgs& args) { | 516 void DelegatedFrameHost::OnBeginFrame(const cc::BeginFrameArgs& args) { |
517 client_->OnBeginFrame(args); | 517 client_->OnBeginFrame(args); |
518 } | 518 } |
519 | 519 |
520 void DelegatedFrameHost::EvictDelegatedFrame() { | 520 void DelegatedFrameHost::EvictDelegatedFrame() { |
521 if (!has_frame_) | 521 if (!has_frame_) |
522 return; | 522 return; |
523 client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent(); | 523 client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent(); |
524 support_->EvictFrame(); | 524 support_->EvictCurrentSurface(); |
525 has_frame_ = false; | 525 has_frame_ = false; |
526 resize_lock_.reset(); | 526 resize_lock_.reset(); |
527 frame_evictor_->DiscardedFrame(); | 527 frame_evictor_->DiscardedFrame(); |
528 UpdateGutters(); | 528 UpdateGutters(); |
529 } | 529 } |
530 | 530 |
531 // static | 531 // static |
532 void DelegatedFrameHost::ReturnSubscriberTexture( | 532 void DelegatedFrameHost::ReturnSubscriberTexture( |
533 base::WeakPtr<DelegatedFrameHost> dfh, | 533 base::WeakPtr<DelegatedFrameHost> dfh, |
534 scoped_refptr<OwnedMailbox> subscriber_texture, | 534 scoped_refptr<OwnedMailbox> subscriber_texture, |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 } | 862 } |
863 | 863 |
864 if (!skipped_frames_) { | 864 if (!skipped_frames_) { |
865 latest_confirmed_begin_frame_source_id_ = ack.source_id; | 865 latest_confirmed_begin_frame_source_id_ = ack.source_id; |
866 latest_confirmed_begin_frame_sequence_number_ = | 866 latest_confirmed_begin_frame_sequence_number_ = |
867 ack.latest_confirmed_sequence_number; | 867 ack.latest_confirmed_sequence_number; |
868 } | 868 } |
869 } | 869 } |
870 | 870 |
871 } // namespace content | 871 } // namespace content |
OLD | NEW |