| 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; | |
| 426 default: | 423 default: |
| 427 NOTREACHED(); | 424 NOTREACHED(); |
| 428 return VideoFrameExternalResources(); | 425 return VideoFrameExternalResources(); |
| 429 } | 426 } |
| 430 break; | 427 break; |
| 431 case media::VideoFrame::TEXTURE_YUV_420: | 428 case media::VideoFrame::TEXTURE_YUV_420: |
| 432 external_resources.type = VideoFrameExternalResources::YUV_RESOURCE; | 429 external_resources.type = VideoFrameExternalResources::YUV_RESOURCE; |
| 433 break; | 430 break; |
| 434 } | 431 } |
| 435 DCHECK_NE(VideoFrameExternalResources::NONE, external_resources.type); | 432 DCHECK_NE(VideoFrameExternalResources::NONE, external_resources.type); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 resource_it->ref_count = 0; | 473 resource_it->ref_count = 0; |
| 477 updater->DeleteResource(resource_it); | 474 updater->DeleteResource(resource_it); |
| 478 return; | 475 return; |
| 479 } | 476 } |
| 480 | 477 |
| 481 --resource_it->ref_count; | 478 --resource_it->ref_count; |
| 482 DCHECK_GE(resource_it->ref_count, 0); | 479 DCHECK_GE(resource_it->ref_count, 0); |
| 483 } | 480 } |
| 484 | 481 |
| 485 } // namespace cc | 482 } // namespace cc |
| OLD | NEW |