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