Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WebSkImage_h | |
| 6 #define WebSkImage_h | |
| 7 | |
| 8 #include "WebPrivatePtr.h" | |
| 9 #include "third_party/skia/include/core/SkImage.h" | |
| 10 | |
| 11 #if INSIDE_BLINK | |
| 12 namespace WTF { | |
| 13 template <typename T> class PassRefPtr; | |
|
esprehn
2015/12/03 18:47:35
you could just #include "wtf/Forward.h" inside the
emircan
2015/12/04 03:23:25
Done.
| |
| 14 } | |
| 15 #endif | |
| 16 | |
| 17 namespace blink { | |
| 18 | |
| 19 // A container for an SkImage | |
| 20 class BLINK_PLATFORM_EXPORT WebSkImage { | |
| 21 public: | |
| 22 WebSkImage(); | |
| 23 WebSkImage(const WebSkImage&); | |
| 24 ~WebSkImage(); | |
| 25 | |
| 26 bool isNull() const { return m_image.isNull(); } | |
| 27 int width() const; | |
| 28 int height() const; | |
| 29 bool readPixels(const SkImageInfo& dstInfo, | |
| 30 void* dstPixels, | |
| 31 size_t dstRowBytes, | |
| 32 int srcX, | |
| 33 int srcY) const; | |
| 34 | |
| 35 #if INSIDE_BLINK | |
| 36 WebSkImage(const WTF::PassRefPtr<SkImage>&); | |
| 37 WebSkImage& operator=(const WTF::PassRefPtr<SkImage>&); | |
| 38 #endif | |
| 39 private: | |
| 40 WebPrivatePtr<SkImage> m_image; | |
| 41 }; | |
| 42 | |
| 43 } // namespace blink | |
| 44 | |
| 45 #endif // WebSkImage_h | |
| OLD | NEW |