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 // See the following specification for details on the ETC1 format: | 5 // See the following specification for details on the ETC1 format: |
6 // https://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8
_texture.txt | 6 // https://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8
_texture.txt |
7 | 7 |
8 #include "cc/raster/texture_compressor_etc1.h" | 8 #include "cc/raster/texture_compressor_etc1.h" |
9 | 9 |
| 10 #include <stdint.h> |
10 #include <string.h> | 11 #include <string.h> |
11 #include <limits> | 12 #include <limits> |
12 | 13 |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 | 15 |
15 // Defining the following macro will cause the error metric function to weigh | 16 // Defining the following macro will cause the error metric function to weigh |
16 // each color channel differently depending on how the human eye can perceive | 17 // each color channel differently depending on how the human eye can perceive |
17 // them. This can give a slight improvement in image quality at the cost of a | 18 // them. This can give a slight improvement in image quality at the cost of a |
18 // performance hit. | 19 // performance hit. |
19 // #define USE_PERCEIVED_ERROR_METRIC | 20 // #define USE_PERCEIVED_ERROR_METRIC |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 memcpy(hor_blocks + 4, row1, 16); | 324 memcpy(hor_blocks + 4, row1, 16); |
324 memcpy(hor_blocks + 8, row2, 16); | 325 memcpy(hor_blocks + 8, row2, 16); |
325 memcpy(hor_blocks + 12, row3, 16); | 326 memcpy(hor_blocks + 12, row3, 16); |
326 | 327 |
327 CompressBlock(dst, ver_blocks, hor_blocks); | 328 CompressBlock(dst, ver_blocks, hor_blocks); |
328 } | 329 } |
329 } | 330 } |
330 } | 331 } |
331 | 332 |
332 } // namespace cc | 333 } // namespace cc |
OLD | NEW |