Index: third_party/WebKit/Source/platform/graphics/UnacceleratedStaticBitmapImage.h |
diff --git a/third_party/WebKit/Source/platform/graphics/UnacceleratedStaticBitmapImage.h b/third_party/WebKit/Source/platform/graphics/UnacceleratedStaticBitmapImage.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dce442b15b4fb284172d8fdd3f9fe5f868744fb0 |
--- /dev/null |
+++ b/third_party/WebKit/Source/platform/graphics/UnacceleratedStaticBitmapImage.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UnacceleratedStaticBitmapImage_h |
+#define UnacceleratedStaticBitmapImage_h |
+ |
+#include "platform/graphics/StaticBitmapImage.h" |
+ |
+namespace blink { |
+ |
+class PLATFORM_EXPORT UnacceleratedStaticBitmapImage final |
+ : public StaticBitmapImage { |
+ public: |
+ ~UnacceleratedStaticBitmapImage() override; |
+ static PassRefPtr<UnacceleratedStaticBitmapImage> create(sk_sp<SkImage>); |
+ |
+ bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override; |
+ IntSize size() const override; |
+ sk_sp<SkImage> imageForCurrentFrame() override; |
+ // In our current design, the SkImage in this class is always *not* |
+ // texture-backed. |
+ bool isTextureBacked() { return false; } |
+ |
+ void draw(SkCanvas*, |
+ const SkPaint&, |
+ const FloatRect& dstRect, |
+ const FloatRect& srcRect, |
+ RespectImageOrientationEnum, |
+ ImageClampingMode) override; |
+ |
+ private: |
+ UnacceleratedStaticBitmapImage(sk_sp<SkImage>); |
+ sk_sp<SkImage> m_image; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif |