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

Side by Side Diff: cc/raster/texture_compressor_etc1.h

Issue 1539203002: Switch to standard integer types in cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 5 years 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 | « cc/raster/task_graph_work_queue.cc ('k') | cc/raster/texture_compressor_etc1.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CC_RASTER_TEXTURE_COMPRESSOR_ETC1_H_ 5 #ifndef CC_RASTER_TEXTURE_COMPRESSOR_ETC1_H_
6 #define CC_RASTER_TEXTURE_COMPRESSOR_ETC1_H_ 6 #define CC_RASTER_TEXTURE_COMPRESSOR_ETC1_H_
7 7
8 #include "cc/raster/texture_compressor.h" 8 #include "cc/raster/texture_compressor.h"
9 9
10 #include <stdint.h>
11
10 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
11 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/macros.h"
12 15
13 namespace cc { 16 namespace cc {
14 17
15 template <typename T> 18 template <typename T>
16 inline T clamp(T val, T min, T max) { 19 inline T clamp(T val, T min, T max) {
17 return val < min ? min : (val > max ? max : val); 20 return val < min ? min : (val > max ? max : val);
18 } 21 }
19 22
20 inline uint8_t round_to_5_bits(float val) { 23 inline uint8_t round_to_5_bits(float val) {
21 return clamp<uint8_t>(val * 31.0f / 255.0f + 0.5f, 0, 31); 24 return clamp<uint8_t>(val * 31.0f / 255.0f + 0.5f, 0, 31);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 int height, 200 int height,
198 Quality quality) override; 201 Quality quality) override;
199 202
200 private: 203 private:
201 DISALLOW_COPY_AND_ASSIGN(TextureCompressorETC1); 204 DISALLOW_COPY_AND_ASSIGN(TextureCompressorETC1);
202 }; 205 };
203 206
204 } // namespace cc 207 } // namespace cc
205 208
206 #endif // CC_RASTER_TEXTURE_COMPRESSOR_ETC1_H_ 209 #endif // CC_RASTER_TEXTURE_COMPRESSOR_ETC1_H_
OLDNEW
« no previous file with comments | « cc/raster/task_graph_work_queue.cc ('k') | cc/raster/texture_compressor_etc1.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698