diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chromium/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp b/chromium/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp index 55ff319432f..a32fc04b4c9 100644 --- a/chromium/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp +++ b/chromium/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp @@ -47,27 +47,26 @@ DecodingImageGenerator::~DecodingImageGenerator() { } -SkData* DecodingImageGenerator::refEncodedData() +SkData* DecodingImageGenerator::onRefEncodedData() { // FIXME: If the image has been clipped or scaled, do not return the original // encoded data, since on playback it will not be known how the clipping/scaling // was done. - RefPtr<SharedBuffer> buffer = 0; + RefPtr<SharedBuffer> buffer = nullptr; bool allDataReceived = false; m_frameGenerator->copyData(&buffer, &allDataReceived); - if (buffer && allDataReceived) { + if (buffer && allDataReceived) return SkData::NewWithCopy(buffer->data(), buffer->size()); - } return 0; } -bool DecodingImageGenerator::getInfo(SkImageInfo* info) +bool DecodingImageGenerator::onGetInfo(SkImageInfo* info) { *info = m_imageInfo; return true; } -bool DecodingImageGenerator::getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes) +bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, SkPMColor ctable[], int* ctableCount) { TRACE_EVENT1("webkit", "DecodingImageGenerator::getPixels", "index", static_cast<int>(m_frameIndex)); @@ -79,7 +78,7 @@ bool DecodingImageGenerator::getPixels(const SkImageInfo& info, void* pixels, si ASSERT(info.fAlphaType == m_imageInfo.fAlphaType); PlatformInstrumentation::willDecodeLazyPixelRef(m_generationId); bool decoded = m_frameGenerator->decodeAndScale(m_imageInfo, m_frameIndex, pixels, rowBytes); - PlatformInstrumentation::didDecodeLazyPixelRef(m_generationId); + PlatformInstrumentation::didDecodeLazyPixelRef(); return decoded; } |