OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. |
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "platform/graphics/GraphicsTypes3D.h" | 36 #include "platform/graphics/GraphicsTypes3D.h" |
37 #include "platform/graphics/ImageBufferSurface.h" | 37 #include "platform/graphics/ImageBufferSurface.h" |
38 #include "platform/graphics/paint/DisplayItemClient.h" | 38 #include "platform/graphics/paint/DisplayItemClient.h" |
39 #include "platform/transforms/AffineTransform.h" | 39 #include "platform/transforms/AffineTransform.h" |
40 #include "third_party/skia/include/core/SkPaint.h" | 40 #include "third_party/skia/include/core/SkPaint.h" |
41 #include "wtf/Forward.h" | 41 #include "wtf/Forward.h" |
42 #include "wtf/OwnPtr.h" | 42 #include "wtf/OwnPtr.h" |
43 #include "wtf/PassOwnPtr.h" | 43 #include "wtf/PassOwnPtr.h" |
44 #include "wtf/PassRefPtr.h" | 44 #include "wtf/PassRefPtr.h" |
45 #include "wtf/Uint8ClampedArray.h" | 45 #include "wtf/Uint8ClampedArray.h" |
| 46 #include "wtf/Vector.h" |
| 47 #include "wtf/text/WTFString.h" |
46 | 48 |
47 namespace WTF { | 49 namespace WTF { |
48 | 50 |
49 class ArrayBufferContents; | 51 class ArrayBufferContents; |
50 | 52 |
51 } // namespace WTF | 53 } // namespace WTF |
52 | 54 |
53 namespace blink { | 55 namespace blink { |
54 | 56 |
55 class DrawingBuffer; | 57 class DrawingBuffer; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 DrawnToAfterSnapshot, | 147 DrawnToAfterSnapshot, |
146 }; | 148 }; |
147 mutable SnapshotState m_snapshotState; | 149 mutable SnapshotState m_snapshotState; |
148 OwnPtr<ImageBufferSurface> m_surface; | 150 OwnPtr<ImageBufferSurface> m_surface; |
149 ImageBufferClient* m_client; | 151 ImageBufferClient* m_client; |
150 }; | 152 }; |
151 | 153 |
152 struct ImageDataBuffer { | 154 struct ImageDataBuffer { |
153 ImageDataBuffer(const IntSize& size, unsigned char* data) : m_data(data), m_
size(size) { } | 155 ImageDataBuffer(const IntSize& size, unsigned char* data) : m_data(data), m_
size(size) { } |
154 String PLATFORM_EXPORT toDataURL(const String& mimeType, const double* quali
ty) const; | 156 String PLATFORM_EXPORT toDataURL(const String& mimeType, const double* quali
ty) const; |
| 157 bool PLATFORM_EXPORT encodeImage(const String& mimeType, const double* quali
ty, Vector<char>* output) const; |
155 unsigned char* pixels() const { return m_data; } | 158 unsigned char* pixels() const { return m_data; } |
156 int height() const { return m_size.height(); } | 159 int height() const { return m_size.height(); } |
157 int width() const { return m_size.width(); } | 160 int width() const { return m_size.width(); } |
158 unsigned char* m_data; | 161 unsigned char* m_data; |
159 IntSize m_size; | 162 IntSize m_size; |
160 }; | 163 }; |
161 | 164 |
162 } // namespace blink | 165 } // namespace blink |
163 | 166 |
164 #endif // ImageBuffer_h | 167 #endif // ImageBuffer_h |
OLD | NEW |