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

Unified Diff: cc/resources/etc1_pixel_ref.h

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/cc.gyp ('k') | cc/resources/etc1_pixel_ref.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/etc1_pixel_ref.h
diff --git a/cc/resources/etc1_pixel_ref.h b/cc/resources/etc1_pixel_ref.h
new file mode 100644
index 0000000000000000000000000000000000000000..553e3bf408edd39fa3f18819bb7ba043d01f0a98
--- /dev/null
+++ b/cc/resources/etc1_pixel_ref.h
@@ -0,0 +1,37 @@
+// 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.
+
+#ifndef CC_RESOURCES_ETC1_PIXEL_REF_H_
+#define CC_RESOURCES_ETC1_PIXEL_REF_H_
+
+#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
+#include "cc/base/cc_export.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "third_party/skia/include/core/SkFlattenable.h"
+#include "third_party/skia/include/core/SkPixelRef.h"
+
+namespace cc {
+
+class CC_EXPORT ETC1PixelRef : public SkPixelRef {
+ public:
+ // Takes ownership of pixels.
+ explicit ETC1PixelRef(scoped_ptr<uint8_t[]> pixels);
+ virtual ~ETC1PixelRef();
+
+ // SK_DECLARE_UNFLATTENABLE_OBJECT
+ virtual Factory getFactory() const SK_OVERRIDE;
+
+ protected:
+ // Implementation of SkPixelRef.
+ virtual void* onLockPixels(SkColorTable** color_table) SK_OVERRIDE;
+ virtual void onUnlockPixels() SK_OVERRIDE;
+
+ private:
+ scoped_ptr<uint8_t[]> pixels_;
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_ETC1_PIXEL_REF_H_
« no previous file with comments | « cc/cc.gyp ('k') | cc/resources/etc1_pixel_ref.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698