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

Unified Diff: cc/resources/texture_compressor.h

Issue 1015373003: Add texture compression interface and ETC1 encoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move files from cc/resources/texture_compress to cc/resources/ Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: cc/resources/texture_compressor.h
diff --git a/cc/resources/texture_compressor.h b/cc/resources/texture_compressor.h
new file mode 100644
index 0000000000000000000000000000000000000000..18faa40bac5d1dfe547fb7c2249548049f68fbcd
--- /dev/null
+++ b/cc/resources/texture_compressor.h
@@ -0,0 +1,46 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_RESOURCES_TEXTURE_COMPRESSOR_H_
+#define CC_RESOURCES_TEXTURE_COMPRESSOR_H_
+
+#include <stdint.h>
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "cc/base/cc_export.h"
+
+namespace cc {
+
+class CC_EXPORT TextureCompressor {
+ public:
+ enum Format {
+ kFormatETC1,
+ };
+
+ enum Quality {
+ kQualityLow,
+ kQualityMedium,
+ kQualityHigh,
+ };
+
+ static scoped_ptr<TextureCompressor> Create(Format format);
+ virtual ~TextureCompressor() {}
+
+ virtual void Compress(const uint8_t* src,
+ uint8_t* dst,
+ int width,
+ int height,
+ Quality quality) = 0;
+
+ protected:
+ TextureCompressor() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TextureCompressor);
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_TEXTURE_COMPRESSOR_H_

Powered by Google App Engine
This is Rietveld 408576698