| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 { | 113 { |
| 114 return m_client ? m_client->isDirty() : false; | 114 return m_client ? m_client->isDirty() : false; |
| 115 } | 115 } |
| 116 | 116 |
| 117 void ImageBuffer::didFinalizeFrame() | 117 void ImageBuffer::didFinalizeFrame() |
| 118 { | 118 { |
| 119 if (m_client) | 119 if (m_client) |
| 120 m_client->didFinalizeFrame(); | 120 m_client->didFinalizeFrame(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void ImageBuffer::finalizeFrame(const FloatRect &dirtyRect) | 123 void ImageBuffer::finalizeFrame() |
| 124 { | 124 { |
| 125 m_surface->finalizeFrame(dirtyRect); | 125 m_surface->finalizeFrame(); |
| 126 didFinalizeFrame(); | 126 didFinalizeFrame(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 bool ImageBuffer::restoreSurface() const | 129 bool ImageBuffer::restoreSurface() const |
| 130 { | 130 { |
| 131 return m_surface->isValid() || m_surface->restore(); | 131 return m_surface->isValid() || m_surface->restore(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void ImageBuffer::notifySurfaceInvalid() | 134 void ImageBuffer::notifySurfaceInvalid() |
| 135 { | 135 { |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 if (!encodeImage(imageData, mimeType, quality, &encodedImage)) | 422 if (!encodeImage(imageData, mimeType, quality, &encodedImage)) |
| 423 return "data:,"; | 423 return "data:,"; |
| 424 | 424 |
| 425 Vector<char> base64Data; | 425 Vector<char> base64Data; |
| 426 base64Encode(encodedImage, base64Data); | 426 base64Encode(encodedImage, base64Data); |
| 427 | 427 |
| 428 return "data:" + mimeType + ";base64," + base64Data; | 428 return "data:" + mimeType + ";base64," + base64Data; |
| 429 } | 429 } |
| 430 | 430 |
| 431 } // namespace blink | 431 } // namespace blink |
| OLD | NEW |