Skip to content
Permalink
Browse files
2011-04-13 Noel Gordon <noel.gordon@gmail.com>
        Reviewed by Kenneth Russell.

        [chromium] Fix canvas.toDataURL mimeType assertion
        https://bugs.webkit.org/show_bug.cgi?id=58425

        Following r81213, reassert expected toDataURL() mimeType, remove an unused variable.

        No new tests. Covered by existing tests.

        * platform/graphics/skia/ImageBufferSkia.cpp:
        (WebCore::ImageToDataURL):
        (WebCore::ImageBuffer::toDataURL):

Canonical link: https://commits.webkit.org/73547@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Apr 14, 2011
1 parent a201d9c commit b2db0b4ba0b9b7ceb2864d8bbb39868b87fde895
Showing 2 changed files with 17 additions and 3 deletions.
@@ -1,3 +1,18 @@
2011-04-13 Noel Gordon <noel.gordon@gmail.com>

Reviewed by Kenneth Russell.

[chromium] Fix canvas.toDataURL mimeType assertion
https://bugs.webkit.org/show_bug.cgi?id=58425

Following r81213, reassert expected toDataURL() mimeType, remove an unused variable.

No new tests. Covered by existing tests.

* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageToDataURL):
(WebCore::ImageBuffer::toDataURL):

2011-04-12 Luiz Agostini <luiz.agostini@openbossa.org>

Reviewed by Andreas Kling.
@@ -345,6 +345,8 @@ void ImageBuffer::putPremultipliedImageData(ByteArray* source, const IntSize& so
template <typename T>
static String ImageToDataURL(T& source, const String& mimeType, const double* quality)
{
ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType));

Vector<unsigned char> encodedImage;
if (mimeType == "image/jpeg") {
int compressionQuality = JPEGImageEncoder::DefaultCompressionQuality;
@@ -366,9 +368,6 @@ static String ImageToDataURL(T& source, const String& mimeType, const double* qu

String ImageBuffer::toDataURL(const String& mimeType, const double* quality) const
{
ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType));

Vector<unsigned char> encodedImage;
SkDevice* device = context()->platformContext()->canvas()->getDevice();
SkBitmap bitmap = device->accessBitmap(false);

0 comments on commit b2db0b4

Please sign in to comment.