Index: Source/platform/graphics/StaticBitmapImage.h |
diff --git a/LICENSE b/Source/platform/graphics/StaticBitmapImage.h |
similarity index 68% |
copy from LICENSE |
copy to Source/platform/graphics/StaticBitmapImage.h |
index 70bcb8ad118978579fa055f7ecc99604930900ce..8767b0e56ed604e5d49c9493b32016a42e8b6512 100644 |
--- a/LICENSE |
+++ b/Source/platform/graphics/StaticBitmapImage.h |
@@ -28,3 +28,34 @@ |
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+ |
+#ifndef StaticBitmapImage_h |
+#define StaticBitmapImage_h |
+ |
+#include "SkImage.h" |
Justin Novosad
2014/07/29 14:56:52
This can be forward declared.
Rémi Piotaix
2014/07/29 17:18:23
Done.
|
+ |
+#include "platform/graphics/Image.h" |
+ |
+namespace WebCore { |
Justin Novosad
2014/07/29 14:56:52
WebCore -> blink
Rémi Piotaix
2014/07/29 17:18:23
Done.
|
+ |
+class PLATFORM_EXPORT StaticBitmapImage : public Image { |
Justin Novosad
2014/07/29 14:56:53
Does this really need to be exported?
Rémi Piotaix
2014/07/29 17:18:23
Done.
|
+public: |
+ |
+ static PassRefPtr<Image> create(PassRefPtr<SkImage>); |
+ virtual void destroyDecodedData(bool destroyAll) { } |
+ virtual bool currentFrameKnownToBeOpaque() { return false; } |
+ virtual IntSize size() const { return IntSize(m_image->width(), m_image->height()); } |
+ virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator, blink::WebBlendMode); |
+ |
+ |
+ PassRefPtr<SkImage> image() OVERRIDE { return m_image; } |
Justin Novosad
2014/07/29 14:56:53
move to cpp
Rémi Piotaix
2014/07/29 17:18:23
Seems to work with forward-declaration, no need to
|
+ |
+protected: |
+ StaticBitmapImage(PassRefPtr<SkImage>); |
Justin Novosad
2014/07/29 14:56:53
This class should have a virtual destructor (even
Rémi Piotaix
2014/07/29 17:18:23
Done.
|
+ |
+ RefPtr<SkImage> m_image; |
+}; |
+ |
+} |
+ |
+#endif |