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 | 10 |
10 namespace cc { | 11 namespace cc { |
11 | 12 |
12 int BitsPerPixel(ResourceFormat format) { | 13 int BitsPerPixel(ResourceFormat format) { |
13 switch (format) { | 14 switch (format) { |
14 case BGRA_8888: | 15 case BGRA_8888: |
15 case RGBA_8888: | 16 case RGBA_8888: |
16 return 32; | 17 return 32; |
17 case RGBA_4444: | 18 case RGBA_4444: |
18 case RGB_565: | 19 case RGB_565: |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 case ETC1: | 135 case ETC1: |
135 case RED_8: | 136 case RED_8: |
136 case LUMINANCE_F16: | 137 case LUMINANCE_F16: |
137 return false; | 138 return false; |
138 } | 139 } |
139 NOTREACHED(); | 140 NOTREACHED(); |
140 return false; | 141 return false; |
141 } | 142 } |
142 | 143 |
143 } // namespace cc | 144 } // namespace cc |
OLD | NEW |