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/resource_format.h" | 5 #include "cc/resources/resource_format.h" |
6 | 6 |
7 #include "third_party/khronos/GLES2/gl2.h" | 7 #include "third_party/khronos/GLES2/gl2.h" |
8 #include "third_party/khronos/GLES2/gl2ext.h" | 8 #include "third_party/khronos/GLES2/gl2ext.h" |
9 #include "ui/gfx/gpu_memory_buffer.h" | 9 #include "ui/gfx/gpu_memory_buffer.h" |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 case BGRA_8888: | 107 case BGRA_8888: |
108 return gfx::BufferFormat::BGRA_8888; | 108 return gfx::BufferFormat::BGRA_8888; |
109 case RED_8: | 109 case RED_8: |
110 return gfx::BufferFormat::R_8; | 110 return gfx::BufferFormat::R_8; |
111 case RGBA_4444: | 111 case RGBA_4444: |
112 return gfx::BufferFormat::RGBA_4444; | 112 return gfx::BufferFormat::RGBA_4444; |
113 case RGBA_8888: | 113 case RGBA_8888: |
114 return gfx::BufferFormat::RGBA_8888; | 114 return gfx::BufferFormat::RGBA_8888; |
115 case ETC1: | 115 case ETC1: |
116 return gfx::BufferFormat::ETC1; | 116 return gfx::BufferFormat::ETC1; |
| 117 case RGBA_F16: |
| 118 return gfx::BufferFormat::RGBA_F16; |
117 case ALPHA_8: | 119 case ALPHA_8: |
118 case LUMINANCE_8: | 120 case LUMINANCE_8: |
119 case RGB_565: | 121 case RGB_565: |
120 case LUMINANCE_F16: | 122 case LUMINANCE_F16: |
121 case RGBA_F16: | |
122 break; | 123 break; |
123 } | 124 } |
124 NOTREACHED(); | 125 NOTREACHED(); |
125 return gfx::BufferFormat::RGBA_8888; | 126 return gfx::BufferFormat::RGBA_8888; |
126 } | 127 } |
127 | 128 |
128 bool IsResourceFormatCompressed(ResourceFormat format) { | 129 bool IsResourceFormatCompressed(ResourceFormat format) { |
129 return format == ETC1; | 130 return format == ETC1; |
130 } | 131 } |
131 | 132 |
(...skipping 10 matching lines...) Expand all Loading... |
142 case ETC1: | 143 case ETC1: |
143 case RED_8: | 144 case RED_8: |
144 case LUMINANCE_F16: | 145 case LUMINANCE_F16: |
145 return false; | 146 return false; |
146 } | 147 } |
147 NOTREACHED(); | 148 NOTREACHED(); |
148 return false; | 149 return false; |
149 } | 150 } |
150 | 151 |
151 } // namespace cc | 152 } // namespace cc |
OLD | NEW |