| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ImagePixelLocker_h | 5 #ifndef ImagePixelLocker_h |
| 6 #define ImagePixelLocker_h | 6 #define ImagePixelLocker_h |
| 7 | 7 |
| 8 #include "platform/heap/Heap.h" | 8 #include "platform/heap/Heap.h" |
| 9 #include "platform/wtf/Allocator.h" |
| 10 #include "platform/wtf/Noncopyable.h" |
| 11 #include "platform/wtf/PassRefPtr.h" |
| 12 #include "platform/wtf/RefPtr.h" |
| 9 #include "third_party/skia/include/core/SkImageInfo.h" | 13 #include "third_party/skia/include/core/SkImageInfo.h" |
| 10 #include "third_party/skia/include/core/SkRefCnt.h" | 14 #include "third_party/skia/include/core/SkRefCnt.h" |
| 11 #include "wtf/Allocator.h" | |
| 12 #include "wtf/Noncopyable.h" | |
| 13 #include "wtf/PassRefPtr.h" | |
| 14 #include "wtf/RefPtr.h" | |
| 15 | 15 |
| 16 class SkImage; | 16 class SkImage; |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 | 19 |
| 20 class ImagePixelLocker final { | 20 class ImagePixelLocker final { |
| 21 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 21 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 22 WTF_MAKE_NONCOPYABLE(ImagePixelLocker); | 22 WTF_MAKE_NONCOPYABLE(ImagePixelLocker); |
| 23 | 23 |
| 24 public: | 24 public: |
| 25 ImagePixelLocker(sk_sp<const SkImage>, SkAlphaType, SkColorType); | 25 ImagePixelLocker(sk_sp<const SkImage>, SkAlphaType, SkColorType); |
| 26 | 26 |
| 27 const void* pixels() const { return m_pixels; } | 27 const void* pixels() const { return m_pixels; } |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 const sk_sp<const SkImage> m_image; | 30 const sk_sp<const SkImage> m_image; |
| 31 const void* m_pixels; | 31 const void* m_pixels; |
| 32 Vector<char> m_pixelStorage; | 32 Vector<char> m_pixelStorage; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } // namespace blink | 35 } // namespace blink |
| 36 | 36 |
| 37 #endif | 37 #endif |
| OLD | NEW |