| 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 "third_party/skia/include/core/SkImage.h" | 12 #include "third_party/skia/include/core/SkImage.h" |
| 13 #include "third_party/skia/include/core/SkRefCnt.h" | 13 #include "third_party/skia/include/core/SkRefCnt.h" |
| 14 #include "wtf/PassRefPtr.h" | 14 #include "wtf/PassRefPtr.h" |
| 15 | 15 |
| 16 class SkCanvas; | 16 class SkCanvas; |
| 17 class SkPaint; | 17 class SkPaint; |
| 18 | 18 |
| 19 namespace blink { | 19 namespace blink { |
| 20 | 20 |
| 21 class FloatPoint; | |
| 22 class FloatRect; | 21 class FloatRect; |
| 23 class FloatSize; | |
| 24 class GraphicsContext; | |
| 25 class ImageObserver; | 22 class ImageObserver; |
| 26 | 23 |
| 27 // A generated placeholder image that shows a translucent gray rectangle. | 24 // A generated placeholder image that shows a translucent gray rectangle. |
| 28 class PLATFORM_EXPORT PlaceholderImage final : public Image { | 25 class PLATFORM_EXPORT PlaceholderImage final : public Image { |
| 29 public: | 26 public: |
| 30 static PassRefPtr<PlaceholderImage> create(ImageObserver* observer, | 27 static PassRefPtr<PlaceholderImage> create(ImageObserver* observer, |
| 31 const IntSize& size) { | 28 const IntSize& size) { |
| 32 return adoptRef(new PlaceholderImage(observer, size)); | 29 return adoptRef(new PlaceholderImage(observer, size)); |
| 33 } | 30 } |
| 34 | 31 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 59 } | 56 } |
| 60 | 57 |
| 61 IntSize m_size; | 58 IntSize m_size; |
| 62 // Lazily initialized. | 59 // Lazily initialized. |
| 63 sk_sp<SkImage> m_imageForCurrentFrame; | 60 sk_sp<SkImage> m_imageForCurrentFrame; |
| 64 }; | 61 }; |
| 65 | 62 |
| 66 } // namespace blink | 63 } // namespace blink |
| 67 | 64 |
| 68 #endif | 65 #endif |
| OLD | NEW |