| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 DelegatedFrameHost::DelegatedFrameHost(DelegatedFrameHostClient* client) | 66 DelegatedFrameHost::DelegatedFrameHost(DelegatedFrameHostClient* client) |
| 67 : client_(client), | 67 : client_(client), |
| 68 compositor_(nullptr), | 68 compositor_(nullptr), |
| 69 tick_clock_(new base::DefaultTickClock()), | 69 tick_clock_(new base::DefaultTickClock()), |
| 70 last_output_surface_id_(0), | 70 last_output_surface_id_(0), |
| 71 pending_delegated_ack_count_(0), | 71 pending_delegated_ack_count_(0), |
| 72 skipped_frames_(false), | 72 skipped_frames_(false), |
| 73 background_color_(SK_ColorRED), | 73 background_color_(SK_ColorRED), |
| 74 current_scale_factor_(1.f), | 74 current_scale_factor_(1.f), |
| 75 can_lock_compositor_(YES_CAN_LOCK), | 75 can_lock_compositor_(YES_CAN_LOCK), |
| 76 delegated_frame_evictor_(new DelegatedFrameEvictor(this)), | 76 delegated_frame_evictor_(new DelegatedFrameEvictor(this)) { |
| 77 begin_frame_source_(nullptr) { | |
| 78 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | 77 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); |
| 79 factory->AddObserver(this); | 78 factory->AddObserver(this); |
| 80 id_allocator_ = factory->GetContextFactory()->CreateSurfaceIdAllocator(); | 79 id_allocator_ = factory->GetContextFactory()->CreateSurfaceIdAllocator(); |
| 81 factory->GetSurfaceManager()->RegisterSurfaceFactoryClient( | 80 factory->GetSurfaceManager()->RegisterSurfaceFactoryClient( |
| 82 id_allocator_->id_namespace(), this); | 81 id_allocator_->id_namespace(), this); |
| 83 } | 82 } |
| 84 | 83 |
| 85 void DelegatedFrameHost::WasShown(const ui::LatencyInfo& latency_info) { | 84 void DelegatedFrameHost::WasShown(const ui::LatencyInfo& latency_info) { |
| 86 delegated_frame_evictor_->SetVisible(true); | 85 delegated_frame_evictor_->SetVisible(true); |
| 87 | 86 |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 cc::SurfaceManager* manager = factory->GetSurfaceManager(); | 882 cc::SurfaceManager* manager = factory->GetSurfaceManager(); |
| 884 new_layer->SetShowSurface( | 883 new_layer->SetShowSurface( |
| 885 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), | 884 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), |
| 886 base::Bind(&RequireCallback, base::Unretained(manager)), | 885 base::Bind(&RequireCallback, base::Unretained(manager)), |
| 887 current_surface_size_, current_scale_factor_, | 886 current_surface_size_, current_scale_factor_, |
| 888 current_frame_size_in_dip_); | 887 current_frame_size_in_dip_); |
| 889 } | 888 } |
| 890 } | 889 } |
| 891 | 890 |
| 892 } // namespace content | 891 } // namespace content |
| OLD | NEW |