Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 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_ETC1_PIXEL_REF_H_ | |
| 6 #define CC_RESOURCES_ETC1_PIXEL_REF_H_ | |
| 7 | |
| 8 #include "base/logging.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "third_party/skia/include/core/SkBitmap.h" | |
| 11 #include "third_party/skia/include/core/SkPixelRef.h" | |
| 12 | |
| 13 namespace cc { | |
| 14 | |
| 15 class ETC1PixelRef : public SkPixelRef { | |
| 16 public: | |
| 17 // Takes ownership of pixels. | |
| 18 explicit ETC1PixelRef(scoped_ptr<uint8_t[]> pixels); | |
|
aelias_OOO_until_Jul13
2013/11/07 19:30:27
Could you also make this take a gfx::Size in the c
powei
2013/11/07 19:45:31
Then both UIResourceBitmap and this class will hol
| |
| 19 virtual ~ETC1PixelRef() {} | |
| 20 SK_DECLARE_UNFLATTENABLE_OBJECT() | |
| 21 | |
| 22 protected: | |
| 23 // Implementation of SkPixelRef. | |
| 24 virtual void* onLockPixels(SkColorTable** color_table) SK_OVERRIDE; | |
| 25 virtual void onUnlockPixels() SK_OVERRIDE {} | |
| 26 | |
| 27 private: | |
| 28 scoped_ptr<uint8_t[]> pixels_; | |
| 29 }; | |
| 30 | |
| 31 } // namespace cc | |
| 32 | |
| 33 #endif // CC_RESOURCES_ETC1_PIXEL_REF_H_ | |
| OLD | NEW |