| 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 | 543 |
| 544 void DelegatedFrameHost::WillDrawSurface(cc::SurfaceId id, | 544 void DelegatedFrameHost::WillDrawSurface(cc::SurfaceId id, |
| 545 const gfx::Rect& damage_rect) { | 545 const gfx::Rect& damage_rect) { |
| 546 if (id != surface_id_) | 546 if (id != surface_id_) |
| 547 return; | 547 return; |
| 548 AttemptFrameSubscriberCapture(damage_rect); | 548 AttemptFrameSubscriberCapture(damage_rect); |
| 549 } | 549 } |
| 550 | 550 |
| 551 void DelegatedFrameHost::SetBeginFrameSource( | 551 void DelegatedFrameHost::SetBeginFrameSource( |
| 552 cc::BeginFrameSource* begin_frame_source) { | 552 cc::BeginFrameSource* begin_frame_source) { |
| 553 // TODO(enne): forward this to DelegatedFrameHostClient to observe and then to | 553 client_->SetBeginFrameSource(begin_frame_source); |
| 554 // the renderer as an external begin frame source. | |
| 555 } | 554 } |
| 556 | 555 |
| 557 void DelegatedFrameHost::EvictDelegatedFrame() { | 556 void DelegatedFrameHost::EvictDelegatedFrame() { |
| 558 client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent(); | 557 client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent(); |
| 559 if (!surface_id_.is_null()) { | 558 if (!surface_id_.is_null()) { |
| 560 surface_factory_->Destroy(surface_id_); | 559 surface_factory_->Destroy(surface_id_); |
| 561 surface_id_ = cc::SurfaceId(); | 560 surface_id_ = cc::SurfaceId(); |
| 562 } | 561 } |
| 563 delegated_frame_evictor_->DiscardedFrame(); | 562 delegated_frame_evictor_->DiscardedFrame(); |
| 564 UpdateGutters(); | 563 UpdateGutters(); |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 cc::SurfaceManager* manager = factory->GetSurfaceManager(); | 874 cc::SurfaceManager* manager = factory->GetSurfaceManager(); |
| 876 new_layer->SetShowSurface( | 875 new_layer->SetShowSurface( |
| 877 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), | 876 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), |
| 878 base::Bind(&RequireCallback, base::Unretained(manager)), | 877 base::Bind(&RequireCallback, base::Unretained(manager)), |
| 879 current_surface_size_, current_scale_factor_, | 878 current_surface_size_, current_scale_factor_, |
| 880 current_frame_size_in_dip_); | 879 current_frame_size_in_dip_); |
| 881 } | 880 } |
| 882 } | 881 } |
| 883 | 882 |
| 884 } // namespace content | 883 } // namespace content |
| OLD | NEW |