OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CC_RESOURCES_TEXTURE_COMPRESSOR_H_ | |
6 #define CC_RESOURCES_TEXTURE_COMPRESSOR_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include "base/macros.h" | |
11 #include "base/memory/scoped_ptr.h" | |
12 | |
13 namespace cc { | |
14 | |
15 class TextureCompressor { | |
16 public: | |
17 enum Format { | |
18 kFormatETC1, | |
19 }; | |
20 | |
21 enum Quality { | |
22 kQualityLow, | |
23 kQualityMedium, | |
24 kQualityHigh, | |
25 }; | |
26 | |
27 static scoped_ptr<TextureCompressor> Create(Format format); | |
28 virtual ~TextureCompressor() {} | |
29 | |
30 virtual void Compress(const uint8_t* src, | |
31 uint8_t* dst, | |
32 int width, | |
33 int height, | |
34 Quality quality) = 0; | |
35 | |
36 protected: | |
37 TextureCompressor() {} | |
38 | |
39 private: | |
40 DISALLOW_COPY_AND_ASSIGN(TextureCompressor); | |
41 }; | |
42 | |
43 } // namespace cc | |
44 | |
45 #endif // CC_RESOURCES_TEXTURE_COMPRESSOR_H_ | |
OLD | NEW |