| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 void ImageBuffer::disableDeferral() const | 97 void ImageBuffer::disableDeferral() const |
| 98 { | 98 { |
| 99 return m_surface->disableDeferral(); | 99 return m_surface->disableDeferral(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 bool ImageBuffer::writePixels(const SkImageInfo& info, const void* pixels, size_
t rowBytes, int x, int y) | 102 bool ImageBuffer::writePixels(const SkImageInfo& info, const void* pixels, size_
t rowBytes, int x, int y) |
| 103 { | 103 { |
| 104 return m_surface->writePixels(info, pixels, rowBytes, x, y); | 104 return m_surface->writePixels(info, pixels, rowBytes, x, y); |
| 105 } | 105 } |
| 106 | 106 |
| 107 const SkBitmap& ImageBuffer::deprecatedBitmapForOverwrite() const | 107 const SkBitmap ImageBuffer::deprecatedBitmapForOverwrite() const |
| 108 { | 108 { |
| 109 return m_surface->deprecatedBitmapForOverwrite(); | 109 return m_surface->deprecatedBitmapForOverwrite(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 bool ImageBuffer::isSurfaceValid() const | 112 bool ImageBuffer::isSurfaceValid() const |
| 113 { | 113 { |
| 114 return m_surface->isValid(); | 114 return m_surface->isValid(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 bool ImageBuffer::isDirty() | 117 bool ImageBuffer::isDirty() |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType)); | 374 ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType)); |
| 375 | 375 |
| 376 Vector<unsigned char> result; | 376 Vector<unsigned char> result; |
| 377 if (!encodeImage(mimeType, quality, &result)) | 377 if (!encodeImage(mimeType, quality, &result)) |
| 378 return "data:,"; | 378 return "data:,"; |
| 379 | 379 |
| 380 return "data:" + mimeType + ";base64," + base64Encode(result); | 380 return "data:" + mimeType + ";base64," + base64Encode(result); |
| 381 } | 381 } |
| 382 | 382 |
| 383 } // namespace blink | 383 } // namespace blink |
| OLD | NEW |