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

Side by Side Diff: src/utils/SkTextureCompressor_ASTC.cpp

Issue 2041943002: SkLeanWindows.h: #include "Windows.h" fewer places (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-06-07 (Tuesday) 11:28:42 EDT Created 4 years, 6 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 | « src/utils/SkTextureCompressor.cpp ('k') | src/utils/SkThreadUtils_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkTextureCompressor_ASTC.h" 8 #include "SkTextureCompressor_ASTC.h"
9 #include "SkTextureCompressor_Blitter.h" 9 #include "SkTextureCompressor_Blitter.h"
10 10
11 #include "SkBlitter.h" 11 #include "SkBlitter.h"
12 #include "SkEndian.h" 12 #include "SkEndian.h"
13 #include "SkMath.h" 13 #include "SkMathPriv.h"
14 14
15 // This table contains the weight values for each texel. This is used in determi ning 15 // This table contains the weight values for each texel. This is used in determi ning
16 // how to convert a 12x12 grid of alpha values into a 6x5 grid of index values. Since 16 // how to convert a 12x12 grid of alpha values into a 6x5 grid of index values. Since
17 // we have a 6x5 grid, that gives 30 values that we have to compute. For each in dex, 17 // we have a 6x5 grid, that gives 30 values that we have to compute. For each in dex,
18 // we store up to 20 different triplets of values. In order the triplets are: 18 // we store up to 20 different triplets of values. In order the triplets are:
19 // weight, texel-x, texel-y 19 // weight, texel-x, texel-y
20 // The weight value corresponds to the amount that this index contributes to the final 20 // The weight value corresponds to the amount that this index contributes to the final
21 // index value of the given texel. Hence, we need to reconstruct the 6x5 index g rid 21 // index value of the given texel. Hence, we need to reconstruct the 6x5 index g rid
22 // from their relative contribution to the 12x12 texel grid. 22 // from their relative contribution to the 12x12 texel grid.
23 // 23 //
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after
2092 read_astc_block(&data, src); 2092 read_astc_block(&data, src);
2093 decompress_astc_block(reinterpret_cast<uint8_t*>(colorPtr + x), dstR owBytes, data); 2093 decompress_astc_block(reinterpret_cast<uint8_t*>(colorPtr + x), dstR owBytes, data);
2094 2094
2095 // ASTC encoded blocks are 16 bytes (128 bits) large. 2095 // ASTC encoded blocks are 16 bytes (128 bits) large.
2096 src += 16; 2096 src += 16;
2097 } 2097 }
2098 } 2098 }
2099 } 2099 }
2100 2100
2101 } // SkTextureCompressor 2101 } // SkTextureCompressor
OLDNEW
« no previous file with comments | « src/utils/SkTextureCompressor.cpp ('k') | src/utils/SkThreadUtils_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698