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

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

Issue 2122573003: media: replace LUMINANCE_F16 by RG_88 for 9/10-bit h264 videos Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to ToT Created 4 years, 2 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/resource_format.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/resource_format_utils.h" 5 #include "cc/resources/resource_format_utils.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 SkColorType ResourceFormatToClosestSkColorType(ResourceFormat format) { 9 SkColorType ResourceFormatToClosestSkColorType(ResourceFormat format) {
10 // Use kN32_SkColorType if there is no corresponding SkColorType. 10 // Use kN32_SkColorType if there is no corresponding SkColorType.
11 switch (format) { 11 switch (format) {
12 case RGBA_4444: 12 case RGBA_4444:
13 return kARGB_4444_SkColorType; 13 return kARGB_4444_SkColorType;
14 case RGBA_8888: 14 case RGBA_8888:
15 case BGRA_8888: 15 case BGRA_8888:
16 return kN32_SkColorType; 16 return kN32_SkColorType;
17 case ALPHA_8: 17 case ALPHA_8:
18 return kAlpha_8_SkColorType; 18 return kAlpha_8_SkColorType;
19 case RGB_565: 19 case RGB_565:
20 return kRGB_565_SkColorType; 20 return kRGB_565_SkColorType;
21 case LUMINANCE_8: 21 case LUMINANCE_8:
22 return kGray_8_SkColorType; 22 return kGray_8_SkColorType;
23 case ETC1: 23 case ETC1:
24 case RED_8: 24 case RED_8:
25 case RG_88:
25 case LUMINANCE_F16: 26 case LUMINANCE_F16:
26 return kN32_SkColorType; 27 return kN32_SkColorType;
27 } 28 }
28 NOTREACHED(); 29 NOTREACHED();
29 return kN32_SkColorType; 30 return kN32_SkColorType;
30 } 31 }
31 32
32 } // namespace cc 33 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_format.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698