Chromium Code Reviews| 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 21 matching lines...) Expand all Loading... | |
| 32 #include "platform/geometry/FloatRect.h" | 32 #include "platform/geometry/FloatRect.h" |
| 33 #include "platform/geometry/IntSize.h" | 33 #include "platform/geometry/IntSize.h" |
| 34 #include "platform/graphics/Canvas2DLayerBridge.h" | 34 #include "platform/graphics/Canvas2DLayerBridge.h" |
| 35 #include "platform/graphics/ColorSpace.h" | 35 #include "platform/graphics/ColorSpace.h" |
| 36 #include "platform/graphics/GraphicsTypes.h" | 36 #include "platform/graphics/GraphicsTypes.h" |
| 37 #include "platform/graphics/GraphicsTypes3D.h" | 37 #include "platform/graphics/GraphicsTypes3D.h" |
| 38 #include "platform/graphics/ImageBufferSurface.h" | 38 #include "platform/graphics/ImageBufferSurface.h" |
| 39 #include "platform/graphics/paint/DisplayItemList.h" | 39 #include "platform/graphics/paint/DisplayItemList.h" |
| 40 #include "platform/transforms/AffineTransform.h" | 40 #include "platform/transforms/AffineTransform.h" |
| 41 #include "third_party/skia/include/core/SkPaint.h" | 41 #include "third_party/skia/include/core/SkPaint.h" |
| 42 #include "wtf/ArrayPiece.h" | |
|
Yuki
2015/01/06 14:57:47
We're going to remove wtf/ArrayBuffer.h, wtf/Array
| |
| 42 #include "wtf/Forward.h" | 43 #include "wtf/Forward.h" |
| 43 #include "wtf/OwnPtr.h" | 44 #include "wtf/OwnPtr.h" |
| 44 #include "wtf/PassOwnPtr.h" | 45 #include "wtf/PassOwnPtr.h" |
| 45 #include "wtf/PassRefPtr.h" | 46 #include "wtf/PassRefPtr.h" |
| 46 #include "wtf/Uint8ClampedArray.h" | |
| 47 | 47 |
| 48 namespace WTF { | 48 namespace WTF { |
| 49 | 49 |
| 50 class ArrayBufferContents; | 50 class ArrayBufferContents; |
| 51 | 51 |
| 52 } // namespace WTF | 52 } // namespace WTF |
| 53 | 53 |
| 54 namespace blink { | 54 namespace blink { |
| 55 | 55 |
| 56 class DrawingBuffer; | 56 class DrawingBuffer; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 friend class CrossfadeGeneratedImage; | 155 friend class CrossfadeGeneratedImage; |
| 156 friend class GradientGeneratedImage; | 156 friend class GradientGeneratedImage; |
| 157 friend class SkiaImageFilterBuilder; | 157 friend class SkiaImageFilterBuilder; |
| 158 | 158 |
| 159 OwnPtr<ImageBufferSurface> m_surface; | 159 OwnPtr<ImageBufferSurface> m_surface; |
| 160 OwnPtr<GraphicsContext> m_context; | 160 OwnPtr<GraphicsContext> m_context; |
| 161 ImageBufferClient* m_client; | 161 ImageBufferClient* m_client; |
| 162 OwnPtr<DisplayItemList> m_displayItemList; | 162 OwnPtr<DisplayItemList> m_displayItemList; |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 struct ImageDataBuffer { | 165 struct ImageDataBuffer : public IntSize, public ArrayPiece { |
| 166 ImageDataBuffer(const IntSize& size, PassRefPtr<Uint8ClampedArray> data) : m _size(size), m_data(data) { } | 166 ImageDataBuffer(const IntSize& size, void* data) : IntSize(size), ArrayPiece (data, 0) { } |
| 167 IntSize size() const { return m_size; } | |
| 168 unsigned char* data() const { return m_data->data(); } | |
| 169 | |
| 170 IntSize m_size; | |
| 171 RefPtr<Uint8ClampedArray> m_data; | |
| 172 }; | 167 }; |
| 173 | 168 |
| 174 String PLATFORM_EXPORT ImageDataToDataURL(const ImageDataBuffer&, const String& mimeType, const double* quality); | 169 String PLATFORM_EXPORT ImageDataToDataURL(const ImageDataBuffer&, const String& mimeType, const double* quality); |
| 175 | 170 |
| 176 } // namespace blink | 171 } // namespace blink |
| 177 | 172 |
| 178 #endif // ImageBuffer_h | 173 #endif // ImageBuffer_h |
| OLD | NEW |