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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 // Setting the source in this copy request asks that the layer abort any prior | 377 // Setting the source in this copy request asks that the layer abort any prior |
378 // uncommitted copy requests made on behalf of the same frame subscriber. | 378 // uncommitted copy requests made on behalf of the same frame subscriber. |
379 // This will not affect any of the copy requests spawned elsewhere from | 379 // This will not affect any of the copy requests spawned elsewhere from |
380 // DelegatedFrameHost (e.g., a call to CopyFromCompositingSurface() for | 380 // DelegatedFrameHost (e.g., a call to CopyFromCompositingSurface() for |
381 // screenshots) since those copy requests do not specify |frame_subscriber()| | 381 // screenshots) since those copy requests do not specify |frame_subscriber()| |
382 // as a source. | 382 // as a source. |
383 request->set_source(frame_subscriber()); | 383 request->set_source(frame_subscriber()); |
384 if (subscriber_texture.get()) { | 384 if (subscriber_texture.get()) { |
385 request->SetTextureMailbox(cc::TextureMailbox( | 385 request->SetTextureMailbox(cc::TextureMailbox( |
386 subscriber_texture->mailbox(), subscriber_texture->sync_token(), | 386 subscriber_texture->mailbox(), subscriber_texture->sync_token(), |
387 subscriber_texture->target())); | 387 subscriber_texture->target(), current_frame_size_in_dip_, false, |
| 388 false)); |
388 } | 389 } |
389 | 390 |
390 if (surface_factory_.get()) { | 391 if (surface_factory_.get()) { |
391 // To avoid unnecessary composites, go directly to the Surface rather than | 392 // To avoid unnecessary composites, go directly to the Surface rather than |
392 // through RequestCopyOfOutput (which goes through the browser | 393 // through RequestCopyOfOutput (which goes through the browser |
393 // compositor). | 394 // compositor). |
394 if (!request_copy_of_output_callback_for_testing_.is_null()) | 395 if (!request_copy_of_output_callback_for_testing_.is_null()) |
395 request_copy_of_output_callback_for_testing_.Run(std::move(request)); | 396 request_copy_of_output_callback_for_testing_.Run(std::move(request)); |
396 else | 397 else |
397 surface_factory_->RequestCopyOfSurface(local_frame_id_, | 398 surface_factory_->RequestCopyOfSurface(local_frame_id_, |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 std::move(request)); | 884 std::move(request)); |
884 } | 885 } |
885 } | 886 } |
886 | 887 |
887 void DelegatedFrameHost::UnlockResources() { | 888 void DelegatedFrameHost::UnlockResources() { |
888 DCHECK(!local_frame_id_.is_null()); | 889 DCHECK(!local_frame_id_.is_null()); |
889 delegated_frame_evictor_->UnlockFrame(); | 890 delegated_frame_evictor_->UnlockFrame(); |
890 } | 891 } |
891 | 892 |
892 } // namespace content | 893 } // namespace content |
OLD | NEW |