OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ui/gfx/buffer_format_util.h" | 5 #include "ui/gfx/buffer_format_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/macros.h" |
8 #include "base/numerics/safe_math.h" | 9 #include "base/numerics/safe_math.h" |
9 | 10 |
10 namespace gfx { | 11 namespace gfx { |
11 namespace { | 12 namespace { |
12 | 13 |
13 const BufferFormat kBufferFormats[] = {BufferFormat::ATC, | 14 const BufferFormat kBufferFormats[] = {BufferFormat::ATC, |
14 BufferFormat::ATCIA, | 15 BufferFormat::ATCIA, |
15 BufferFormat::DXT1, | 16 BufferFormat::DXT1, |
16 BufferFormat::DXT5, | 17 BufferFormat::DXT5, |
17 BufferFormat::ETC1, | 18 BufferFormat::ETC1, |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 DCHECK_LT(plane, arraysize(offset_in_2x2_sub_sampling_sizes)); | 208 DCHECK_LT(plane, arraysize(offset_in_2x2_sub_sampling_sizes)); |
208 return offset_in_2x2_sub_sampling_sizes[plane] * | 209 return offset_in_2x2_sub_sampling_sizes[plane] * |
209 (size.width() / 2 + size.height() / 2); | 210 (size.width() / 2 + size.height() / 2); |
210 } | 211 } |
211 } | 212 } |
212 NOTREACHED(); | 213 NOTREACHED(); |
213 return 0; | 214 return 0; |
214 } | 215 } |
215 | 216 |
216 } // namespace gfx | 217 } // namespace gfx |
OLD | NEW |