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

Unified Diff: cc/resources/texture_compress/texture_compressor.cc

Issue 1015373003: Add texture compression interface and ETC1 encoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove compressor pointer check 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_compress/texture_compressor.cc
diff --git a/cc/resources/texture_compress/texture_compressor.cc b/cc/resources/texture_compress/texture_compressor.cc
new file mode 100644
index 0000000000000000000000000000000000000000..09fe93220fc74e09035c71151a51a4be7488a9aa
--- /dev/null
+++ b/cc/resources/texture_compress/texture_compressor.cc
@@ -0,0 +1,22 @@
+// 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.
+
+#include "cc/resources/texture_compress/texture_compressor.h"
+
+#include "base/logging.h"
+#include "cc/resources/texture_compress/texture_compressor_etc1.h"
+
+namespace cc {
+
+scoped_ptr<TextureCompressor> TextureCompressor::Create(Format format) {
+ switch (format) {
+ case kFormatETC1:
+ return make_scoped_ptr(new TextureCompressorETC1());
+ }
+
+ NOTREACHED();
+ return nullptr;
+}
+
+} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698