Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Side by Side Diff: cc/resources/video_resource_updater.cc

Issue 1149873010: cc: Remove IOSurface explicit support in VideoLayerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/resources/video_resource_updater.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698