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/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 if (video_frame->texture_format() == media::VideoFrame::TEXTURE_RGB) | 413 if (video_frame->texture_format() == media::VideoFrame::TEXTURE_RGB) |
414 external_resources.type = VideoFrameExternalResources::RGB_RESOURCE; | 414 external_resources.type = VideoFrameExternalResources::RGB_RESOURCE; |
415 else | 415 else |
416 external_resources.type = | 416 external_resources.type = |
417 VideoFrameExternalResources::RGBA_RESOURCE; | 417 VideoFrameExternalResources::RGBA_RESOURCE; |
418 break; | 418 break; |
419 case GL_TEXTURE_EXTERNAL_OES: | 419 case GL_TEXTURE_EXTERNAL_OES: |
420 external_resources.type = | 420 external_resources.type = |
421 VideoFrameExternalResources::STREAM_TEXTURE_RESOURCE; | 421 VideoFrameExternalResources::STREAM_TEXTURE_RESOURCE; |
422 break; | 422 break; |
| 423 case GL_TEXTURE_RECTANGLE_ARB: |
| 424 external_resources.type = VideoFrameExternalResources::IO_SURFACE; |
| 425 break; |
423 default: | 426 default: |
424 NOTREACHED(); | 427 NOTREACHED(); |
425 return VideoFrameExternalResources(); | 428 return VideoFrameExternalResources(); |
426 } | 429 } |
427 break; | 430 break; |
428 case media::VideoFrame::TEXTURE_YUV_420: | 431 case media::VideoFrame::TEXTURE_YUV_420: |
429 external_resources.type = VideoFrameExternalResources::YUV_RESOURCE; | 432 external_resources.type = VideoFrameExternalResources::YUV_RESOURCE; |
430 break; | 433 break; |
431 } | 434 } |
432 DCHECK_NE(VideoFrameExternalResources::NONE, external_resources.type); | 435 DCHECK_NE(VideoFrameExternalResources::NONE, external_resources.type); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 resource_it->ref_count = 0; | 476 resource_it->ref_count = 0; |
474 updater->DeleteResource(resource_it); | 477 updater->DeleteResource(resource_it); |
475 return; | 478 return; |
476 } | 479 } |
477 | 480 |
478 --resource_it->ref_count; | 481 --resource_it->ref_count; |
479 DCHECK_GE(resource_it->ref_count, 0); | 482 DCHECK_GE(resource_it->ref_count, 0); |
480 } | 483 } |
481 | 484 |
482 } // namespace cc | 485 } // namespace cc |
OLD | NEW |