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

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

Issue 2447013002: cc::VideoResourceUpdater: NOTREACHED;return; replaced by DCHECK. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 break; 425 break;
426 case media::PIXEL_FORMAT_Y16: 426 case media::PIXEL_FORMAT_Y16:
427 bits_per_channel = 16; 427 bits_per_channel = 16;
428 break; 428 break;
429 } 429 }
430 430
431 // TODO(dshwang): support PIXEL_FORMAT_Y16. crbug.com/624436 431 // TODO(dshwang): support PIXEL_FORMAT_Y16. crbug.com/624436
432 DCHECK_NE(bits_per_channel, 16); 432 DCHECK_NE(bits_per_channel, 16);
433 433
434 // Only YUV software video frames are supported. 434 // Only YUV software video frames are supported.
435 if (!media::IsYuvPlanar(input_frame_format)) { 435 DCHECK(media::IsYuvPlanar(input_frame_format));
436 NOTREACHED() << media::VideoPixelFormatToString(input_frame_format);
437 return VideoFrameExternalResources();
438 }
439 436
440 const bool software_compositor = context_provider_ == NULL; 437 const bool software_compositor = context_provider_ == NULL;
441 438
442 ResourceFormat output_resource_format = 439 ResourceFormat output_resource_format =
443 resource_provider_->YuvResourceFormat(bits_per_channel); 440 resource_provider_->YuvResourceFormat(bits_per_channel);
444 441
445 // If GPU compositing is enabled, but the output resource format 442 // If GPU compositing is enabled, but the output resource format
446 // returned by the resource provider is RGBA_8888, then a GPU driver 443 // returned by the resource provider is RGBA_8888, then a GPU driver
447 // bug workaround requires that YUV frames must be converted to RGB 444 // bug workaround requires that YUV frames must be converted to RGB
448 // before texture upload. 445 // before texture upload.
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 if (lost_resource) { 798 if (lost_resource) {
802 resource_it->clear_refs(); 799 resource_it->clear_refs();
803 updater->DeleteResource(resource_it); 800 updater->DeleteResource(resource_it);
804 return; 801 return;
805 } 802 }
806 803
807 resource_it->remove_ref(); 804 resource_it->remove_ref();
808 } 805 }
809 806
810 } // namespace cc 807 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698