| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 PlaceholderImage_h | 5 #ifndef PlaceholderImage_h |
| 6 #define PlaceholderImage_h | 6 #define PlaceholderImage_h |
| 7 | 7 |
| 8 #include "platform/SharedBuffer.h" | 8 #include "platform/SharedBuffer.h" |
| 9 #include "platform/geometry/IntSize.h" | 9 #include "platform/geometry/IntSize.h" |
| 10 #include "platform/graphics/Image.h" | 10 #include "platform/graphics/Image.h" |
| 11 #include "platform/graphics/ImageOrientation.h" | 11 #include "platform/graphics/ImageOrientation.h" |
| 12 #include "platform/wtf/PassRefPtr.h" |
| 12 #include "third_party/skia/include/core/SkImage.h" | 13 #include "third_party/skia/include/core/SkImage.h" |
| 13 #include "third_party/skia/include/core/SkRefCnt.h" | 14 #include "third_party/skia/include/core/SkRefCnt.h" |
| 14 #include "wtf/PassRefPtr.h" | |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 class FloatRect; | 18 class FloatRect; |
| 19 class ImageObserver; | 19 class ImageObserver; |
| 20 | 20 |
| 21 // A generated placeholder image that shows a translucent gray rectangle. | 21 // A generated placeholder image that shows a translucent gray rectangle. |
| 22 class PLATFORM_EXPORT PlaceholderImage final : public Image { | 22 class PLATFORM_EXPORT PlaceholderImage final : public Image { |
| 23 public: | 23 public: |
| 24 static PassRefPtr<PlaceholderImage> create(ImageObserver* observer, | 24 static PassRefPtr<PlaceholderImage> create(ImageObserver* observer, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 53 } | 53 } |
| 54 | 54 |
| 55 IntSize m_size; | 55 IntSize m_size; |
| 56 // Lazily initialized. | 56 // Lazily initialized. |
| 57 sk_sp<SkImage> m_imageForCurrentFrame; | 57 sk_sp<SkImage> m_imageForCurrentFrame; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace blink | 60 } // namespace blink |
| 61 | 61 |
| 62 #endif | 62 #endif |
| OLD | NEW |