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

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

Issue 2674493003: Add compositor support for half-float RGBA buffers and textures (Closed)
Patch Set: Don't enable on non-ES3 yet Created 3 years, 10 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.cc » ('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 LUMINANCE_F16: 25 case LUMINANCE_F16:
26 return kN32_SkColorType; 26 return kN32_SkColorType;
27 case RGBA_F16:
28 return kRGBA_F16_SkColorType;
27 } 29 }
28 NOTREACHED(); 30 NOTREACHED();
29 return kN32_SkColorType; 31 return kN32_SkColorType;
30 } 32 }
31 33
32 } // namespace cc 34 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_format.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698