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