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

Unified Diff: cc/resources/etc1_pixel_ref.cc

Issue 41903003: cc: Fix incomplete changes to add ETC1 support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed compilation issues Created 7 years, 1 month 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
« no previous file with comments | « cc/resources/etc1_pixel_ref.h ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/etc1_pixel_ref.cc
diff --git a/cc/resources/etc1_pixel_ref.cc b/cc/resources/etc1_pixel_ref.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7a8b8c17b7da4da12d4225c58aa0b7de3e893e1b
--- /dev/null
+++ b/cc/resources/etc1_pixel_ref.cc
@@ -0,0 +1,29 @@
+// Copyright 2013 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/etc1_pixel_ref.h"
+
+#include "base/memory/scoped_ptr.h"
+#include "third_party/skia/include/core/SkPixelRef.h"
+
+namespace cc {
+
+// Takes ownership of pixels.
+ETC1PixelRef::ETC1PixelRef(scoped_ptr<uint8_t[]> pixels)
+ : pixels_(pixels.Pass()) {
+ setImmutable();
+}
+
+ETC1PixelRef::~ETC1PixelRef() {}
+
+void* ETC1PixelRef::onLockPixels(SkColorTable** color_table) {
+ *color_table = NULL;
+ return static_cast<void*>(pixels_.get());
+}
+
+void ETC1PixelRef::onUnlockPixels() {}
+
+SkFlattenable::Factory ETC1PixelRef::getFactory() const { return NULL; }
+
+} // namespace cc
« no previous file with comments | « cc/resources/etc1_pixel_ref.h ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698