Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Side by Side Diff: content/browser/renderer_host/delegated_frame_host.cc

Issue 2811083002: Move frame eviction into components (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 DelegatedFrameHost::DelegatedFrameHost(const cc::FrameSinkId& frame_sink_id, 44 DelegatedFrameHost::DelegatedFrameHost(const cc::FrameSinkId& frame_sink_id,
45 DelegatedFrameHostClient* client) 45 DelegatedFrameHostClient* client)
46 : frame_sink_id_(frame_sink_id), 46 : frame_sink_id_(frame_sink_id),
47 client_(client), 47 client_(client),
48 compositor_(nullptr), 48 compositor_(nullptr),
49 tick_clock_(new base::DefaultTickClock()), 49 tick_clock_(new base::DefaultTickClock()),
50 skipped_frames_(false), 50 skipped_frames_(false),
51 background_color_(SK_ColorRED), 51 background_color_(SK_ColorRED),
52 current_scale_factor_(1.f), 52 current_scale_factor_(1.f),
53 delegated_frame_evictor_(new DelegatedFrameEvictor(this)) { 53 delegated_frame_evictor_(
54 new display_compositor::DelegatedFrameEvictor(this)) {
54 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); 55 ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
55 factory->GetContextFactory()->AddObserver(this); 56 factory->GetContextFactory()->AddObserver(this);
56 factory->GetContextFactoryPrivate()->GetSurfaceManager()->RegisterFrameSinkId( 57 factory->GetContextFactoryPrivate()->GetSurfaceManager()->RegisterFrameSinkId(
57 frame_sink_id_); 58 frame_sink_id_);
58 CreateCompositorFrameSinkSupport(); 59 CreateCompositorFrameSinkSupport();
59 } 60 }
60 61
61 void DelegatedFrameHost::WasShown(const ui::LatencyInfo& latency_info) { 62 void DelegatedFrameHost::WasShown(const ui::LatencyInfo& latency_info) {
62 delegated_frame_evictor_->SetVisible(true); 63 delegated_frame_evictor_->SetVisible(true);
63 64
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 } 862 }
862 863
863 if (!skipped_frames_) { 864 if (!skipped_frames_) {
864 latest_confirmed_begin_frame_source_id_ = ack.source_id; 865 latest_confirmed_begin_frame_source_id_ = ack.source_id;
865 latest_confirmed_begin_frame_sequence_number_ = 866 latest_confirmed_begin_frame_sequence_number_ =
866 ack.latest_confirmed_sequence_number; 867 ack.latest_confirmed_sequence_number;
867 } 868 }
868 } 869 }
869 870
870 } // namespace content 871 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698