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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 break; | 378 break; |
379 default: | 379 default: |
380 NOTREACHED(); | 380 NOTREACHED(); |
381 return VideoFrameExternalResources(); | 381 return VideoFrameExternalResources(); |
382 } | 382 } |
383 | 383 |
384 external_resources.mailboxes.push_back( | 384 external_resources.mailboxes.push_back( |
385 TextureMailbox(mailbox_holder->mailbox, | 385 TextureMailbox(mailbox_holder->mailbox, |
386 mailbox_holder->texture_target, | 386 mailbox_holder->texture_target, |
387 mailbox_holder->sync_point)); | 387 mailbox_holder->sync_point)); |
| 388 external_resources.mailboxes.back().set_allow_overlay( |
| 389 video_frame->allow_overlay()); |
388 external_resources.release_callbacks.push_back( | 390 external_resources.release_callbacks.push_back( |
389 base::Bind(&ReturnTexture, AsWeakPtr(), video_frame)); | 391 base::Bind(&ReturnTexture, AsWeakPtr(), video_frame)); |
390 return external_resources; | 392 return external_resources; |
391 } | 393 } |
392 | 394 |
393 // static | 395 // static |
394 void VideoResourceUpdater::RecycleResource( | 396 void VideoResourceUpdater::RecycleResource( |
395 base::WeakPtr<VideoResourceUpdater> updater, | 397 base::WeakPtr<VideoResourceUpdater> updater, |
396 ResourceProvider::ResourceId resource_id, | 398 ResourceProvider::ResourceId resource_id, |
397 uint32 sync_point, | 399 uint32 sync_point, |
(...skipping 22 matching lines...) Expand all Loading... |
420 resource_it->ref_count = 0; | 422 resource_it->ref_count = 0; |
421 updater->DeleteResource(resource_it); | 423 updater->DeleteResource(resource_it); |
422 return; | 424 return; |
423 } | 425 } |
424 | 426 |
425 --resource_it->ref_count; | 427 --resource_it->ref_count; |
426 DCHECK_GE(resource_it->ref_count, 0); | 428 DCHECK_GE(resource_it->ref_count, 0); |
427 } | 429 } |
428 | 430 |
429 } // namespace cc | 431 } // namespace cc |
OLD | NEW |