Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: Source/platform/graphics/ImageBuffer.h

Issue 837643002: Remove Uint8ClampedArray use from ImageBuffer.h ImageDataBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 friend class GradientGeneratedImage; 150 friend class GradientGeneratedImage;
151 friend class SkiaImageFilterBuilder; 151 friend class SkiaImageFilterBuilder;
152 152
153 OwnPtr<ImageBufferSurface> m_surface; 153 OwnPtr<ImageBufferSurface> m_surface;
154 OwnPtr<GraphicsContext> m_context; 154 OwnPtr<GraphicsContext> m_context;
155 ImageBufferClient* m_client; 155 ImageBufferClient* m_client;
156 OwnPtr<DisplayItemList> m_displayItemList; 156 OwnPtr<DisplayItemList> m_displayItemList;
157 }; 157 };
158 158
159 struct ImageDataBuffer { 159 struct ImageDataBuffer {
160 ImageDataBuffer(const IntSize& size, PassRefPtr<Uint8ClampedArray> data) : m _size(size), m_data(data) { } 160 ImageDataBuffer(const IntSize& size, unsigned char* data) : m_data(data), m_ size(size) { }
161 IntSize size() const { return m_size; } 161 String PLATFORM_EXPORT toDataURL(const String& mimeType, const double* quali ty) const;
162 unsigned char* data() const { return m_data->data(); } 162 unsigned char* pixels() const { return m_data; }
163 163 int height() const { return m_size.height(); }
164 int width() const { return m_size.width(); }
165 unsigned char* m_data;
164 IntSize m_size; 166 IntSize m_size;
165 RefPtr<Uint8ClampedArray> m_data;
166 }; 167 };
167 168
168 String PLATFORM_EXPORT ImageDataToDataURL(const ImageDataBuffer&, const String& mimeType, const double* quality);
169
170 } // namespace blink 169 } // namespace blink
171 170
172 #endif // ImageBuffer_h 171 #endif // ImageBuffer_h
OLDNEW
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698