| 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/compositor/delegated_frame_host.h" | 5 #include "content/browser/compositor/delegated_frame_host.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/time/default_tick_clock.h" | 9 #include "base/time/default_tick_clock.h" |
| 10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 resources.end(), | 533 resources.end(), |
| 534 std::back_inserter(surface_returned_resources_)); | 534 std::back_inserter(surface_returned_resources_)); |
| 535 if (!pending_delegated_ack_count_) | 535 if (!pending_delegated_ack_count_) |
| 536 SendReturnedDelegatedResources(last_output_surface_id_); | 536 SendReturnedDelegatedResources(last_output_surface_id_); |
| 537 } | 537 } |
| 538 | 538 |
| 539 void DelegatedFrameHost::SetBeginFrameSource( | 539 void DelegatedFrameHost::SetBeginFrameSource( |
| 540 cc::SurfaceId surface_id, | 540 cc::SurfaceId surface_id, |
| 541 cc::BeginFrameSource* begin_frame_source) { | 541 cc::BeginFrameSource* begin_frame_source) { |
| 542 // TODO(tansell): Hook this up. | 542 // TODO(tansell): Hook this up. |
| 543 NOTIMPLEMENTED(); | |
| 544 } | 543 } |
| 545 | 544 |
| 546 void DelegatedFrameHost::EvictDelegatedFrame() { | 545 void DelegatedFrameHost::EvictDelegatedFrame() { |
| 547 client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent(); | 546 client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent(); |
| 548 frame_provider_ = NULL; | 547 frame_provider_ = NULL; |
| 549 if (!surface_id_.is_null()) { | 548 if (!surface_id_.is_null()) { |
| 550 surface_factory_->Destroy(surface_id_); | 549 surface_factory_->Destroy(surface_id_); |
| 551 surface_id_ = cc::SurfaceId(); | 550 surface_id_ = cc::SurfaceId(); |
| 552 } | 551 } |
| 553 delegated_frame_evictor_->DiscardedFrame(); | 552 delegated_frame_evictor_->DiscardedFrame(); |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1045 cc::SurfaceManager* manager = factory->GetSurfaceManager(); | 1044 cc::SurfaceManager* manager = factory->GetSurfaceManager(); |
| 1046 new_layer->SetShowSurface( | 1045 new_layer->SetShowSurface( |
| 1047 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), | 1046 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), |
| 1048 base::Bind(&RequireCallback, base::Unretained(manager)), | 1047 base::Bind(&RequireCallback, base::Unretained(manager)), |
| 1049 current_surface_size_, current_scale_factor_, | 1048 current_surface_size_, current_scale_factor_, |
| 1050 current_frame_size_in_dip_); | 1049 current_frame_size_in_dip_); |
| 1051 } | 1050 } |
| 1052 } | 1051 } |
| 1053 | 1052 |
| 1054 } // namespace content | 1053 } // namespace content |
| OLD | NEW |