Commit c9ef934d authored by Khushal's avatar Khushal Committed by Commit Bot

blink/images: Don't clear decoder frames for metadata decoder.

The metadata decoder is never used for decoding anything other than the
header, so it should never have any pixel data to evict. Its unnecessary
to evict it from BitmapImage.

R=chrishtr@chromium.org

Bug: 899666
Change-Id: I93a5baa48d95e6c94f7081e9c9c02196a584b9b2
Reviewed-on: https://chromium-review.googlesource.com/c/1305973Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604093}
parent 03ac12bb
...@@ -85,8 +85,6 @@ bool BitmapImage::CurrentFrameHasSingleSecurityOrigin() const { ...@@ -85,8 +85,6 @@ bool BitmapImage::CurrentFrameHasSingleSecurityOrigin() const {
void BitmapImage::DestroyDecodedData() { void BitmapImage::DestroyDecodedData() {
cached_frame_ = PaintImage(); cached_frame_ = PaintImage();
if (decoder_)
decoder_->ClearCacheExceptFrame(kNotFound);
NotifyMemoryChanged(); NotifyMemoryChanged();
} }
......
...@@ -217,11 +217,6 @@ int DeferredImageDecoder::RepetitionCount() const { ...@@ -217,11 +217,6 @@ int DeferredImageDecoder::RepetitionCount() const {
: repetition_count_; : repetition_count_;
} }
void DeferredImageDecoder::ClearCacheExceptFrame(size_t clear_except_frame) {
if (metadata_decoder_)
metadata_decoder_->ClearCacheExceptFrame(clear_except_frame);
}
bool DeferredImageDecoder::FrameHasAlphaAtIndex(size_t index) const { bool DeferredImageDecoder::FrameHasAlphaAtIndex(size_t index) const {
if (metadata_decoder_) if (metadata_decoder_)
return metadata_decoder_->FrameHasAlphaAtIndex(index); return metadata_decoder_->FrameHasAlphaAtIndex(index);
......
...@@ -75,7 +75,6 @@ class PLATFORM_EXPORT DeferredImageDecoder final { ...@@ -75,7 +75,6 @@ class PLATFORM_EXPORT DeferredImageDecoder final {
size_t FrameCount(); size_t FrameCount();
bool ImageIsHighBitDepth() const { return image_is_high_bit_depth_; } bool ImageIsHighBitDepth() const { return image_is_high_bit_depth_; }
int RepetitionCount() const; int RepetitionCount() const;
void ClearCacheExceptFrame(size_t index);
bool FrameHasAlphaAtIndex(size_t index) const; bool FrameHasAlphaAtIndex(size_t index) const;
bool FrameIsReceivedAtIndex(size_t index) const; bool FrameIsReceivedAtIndex(size_t index) const;
TimeDelta FrameDurationAtIndex(size_t index) const; TimeDelta FrameDurationAtIndex(size_t index) const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment