| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, Google Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 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 are | 7 * modification, are permitted provided that the following conditions are |
| 8 * met: | 8 * met: |
| 9 * | 9 * |
| 10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 */ | 31 */ |
| 32 | 32 |
| 33 #include "config.h" | 33 #include "config.h" |
| 34 #include "core/platform/graphics/ImageBuffer.h" | 34 #include "platform/graphics/ImageBuffer.h" |
| 35 | 35 |
| 36 #include "core/platform/graphics/BitmapImage.h" | |
| 37 #include "core/platform/graphics/Extensions3D.h" | |
| 38 #include "core/platform/graphics/GaneshUtils.h" | |
| 39 #include "core/platform/graphics/GraphicsContext3D.h" | |
| 40 #include "core/platform/graphics/gpu/DrawingBuffer.h" | |
| 41 #include "core/platform/graphics/gpu/SharedGraphicsContext3D.h" | |
| 42 #include "core/platform/graphics/skia/NativeImageSkia.h" | |
| 43 #include "core/platform/graphics/skia/SkiaUtils.h" | |
| 44 #include "core/platform/image-encoders/skia/JPEGImageEncoder.h" | |
| 45 #include "core/platform/image-encoders/skia/PNGImageEncoder.h" | |
| 46 #include "core/platform/image-encoders/skia/WEBPImageEncoder.h" | |
| 47 #include "platform/MIMETypeRegistry.h" | 36 #include "platform/MIMETypeRegistry.h" |
| 48 #include "platform/geometry/IntRect.h" | 37 #include "platform/geometry/IntRect.h" |
| 38 #include "platform/graphics/BitmapImage.h" |
| 39 #include "platform/graphics/Extensions3D.h" |
| 40 #include "platform/graphics/GraphicsContext3D.h" |
| 41 #include "platform/graphics/gpu/DrawingBuffer.h" |
| 42 #include "platform/graphics/gpu/SharedGraphicsContext3D.h" |
| 43 #include "platform/graphics/skia/GaneshUtils.h" |
| 44 #include "platform/graphics/skia/NativeImageSkia.h" |
| 45 #include "platform/graphics/skia/SkiaUtils.h" |
| 46 #include "platform/image-encoders/skia/JPEGImageEncoder.h" |
| 47 #include "platform/image-encoders/skia/PNGImageEncoder.h" |
| 48 #include "platform/image-encoders/skia/WEBPImageEncoder.h" |
| 49 #include "public/platform/Platform.h" | 49 #include "public/platform/Platform.h" |
| 50 #include "skia/ext/platform_canvas.h" | 50 #include "skia/ext/platform_canvas.h" |
| 51 #include "third_party/skia/include/core/SkBitmapDevice.h" | 51 #include "third_party/skia/include/core/SkBitmapDevice.h" |
| 52 #include "third_party/skia/include/core/SkColorFilter.h" | 52 #include "third_party/skia/include/core/SkColorFilter.h" |
| 53 #include "third_party/skia/include/core/SkColorPriv.h" | 53 #include "third_party/skia/include/core/SkColorPriv.h" |
| 54 #include "third_party/skia/include/core/SkSurface.h" | 54 #include "third_party/skia/include/core/SkSurface.h" |
| 55 #include "third_party/skia/include/effects/SkTableColorFilter.h" | 55 #include "third_party/skia/include/effects/SkTableColorFilter.h" |
| 56 #include "third_party/skia/include/gpu/GrContext.h" | 56 #include "third_party/skia/include/gpu/GrContext.h" |
| 57 #include "third_party/skia/include/gpu/SkGpuDevice.h" | 57 #include "third_party/skia/include/gpu/SkGpuDevice.h" |
| 58 #include "third_party/skia/include/gpu/SkGrPixelRef.h" | 58 #include "third_party/skia/include/gpu/SkGrPixelRef.h" |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 if (!encodeImage(imageData, mimeType, quality, &encodedImage)) | 559 if (!encodeImage(imageData, mimeType, quality, &encodedImage)) |
| 560 return "data:,"; | 560 return "data:,"; |
| 561 | 561 |
| 562 Vector<char> base64Data; | 562 Vector<char> base64Data; |
| 563 base64Encode(encodedImage, base64Data); | 563 base64Encode(encodedImage, base64Data); |
| 564 | 564 |
| 565 return "data:" + mimeType + ";base64," + base64Data; | 565 return "data:" + mimeType + ";base64," + base64Data; |
| 566 } | 566 } |
| 567 | 567 |
| 568 } // namespace WebCore | 568 } // namespace WebCore |
| OLD | NEW |