OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "cc/resources/video_resource_updater.h" | 5 #include "cc/resources/video_resource_updater.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 break; | 379 break; |
380 default: | 380 default: |
381 NOTREACHED(); | 381 NOTREACHED(); |
382 return VideoFrameExternalResources(); | 382 return VideoFrameExternalResources(); |
383 } | 383 } |
384 | 384 |
385 external_resources.mailboxes.push_back( | 385 external_resources.mailboxes.push_back( |
386 TextureMailbox(mailbox_holder->mailbox, | 386 TextureMailbox(mailbox_holder->mailbox, |
387 mailbox_holder->texture_target, | 387 mailbox_holder->texture_target, |
388 mailbox_holder->sync_point)); | 388 mailbox_holder->sync_point)); |
| 389 external_resources.mailboxes.back().set_allow_overlay( |
| 390 video_frame->allow_overlay()); |
389 external_resources.release_callbacks.push_back( | 391 external_resources.release_callbacks.push_back( |
390 base::Bind(&ReturnTexture, AsWeakPtr(), video_frame)); | 392 base::Bind(&ReturnTexture, AsWeakPtr(), video_frame)); |
391 return external_resources; | 393 return external_resources; |
392 } | 394 } |
393 | 395 |
394 // static | 396 // static |
395 void VideoResourceUpdater::RecycleResource( | 397 void VideoResourceUpdater::RecycleResource( |
396 base::WeakPtr<VideoResourceUpdater> updater, | 398 base::WeakPtr<VideoResourceUpdater> updater, |
397 ResourceProvider::ResourceId resource_id, | 399 ResourceProvider::ResourceId resource_id, |
398 uint32 sync_point, | 400 uint32 sync_point, |
(...skipping 22 matching lines...) Expand all Loading... |
421 resource_it->ref_count = 0; | 423 resource_it->ref_count = 0; |
422 updater->DeleteResource(resource_it); | 424 updater->DeleteResource(resource_it); |
423 return; | 425 return; |
424 } | 426 } |
425 | 427 |
426 --resource_it->ref_count; | 428 --resource_it->ref_count; |
427 DCHECK_GE(resource_it->ref_count, 0); | 429 DCHECK_GE(resource_it->ref_count, 0); |
428 } | 430 } |
429 | 431 |
430 } // namespace cc | 432 } // namespace cc |
OLD | NEW |