New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 618623 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Remove duplicated encoded image data

Project Member Reported by hajimehoshi@chromium.org, Jun 9 2016

Issue description

tasak@ found that encoded image data is duplicated: one is in Image/ImageResource as SharedBuffer and the other is in DefferedImageDecoder as SkRWBuffer. We can remove the former and generate this from SkRWBuffer only when necessary.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c01b976a2461e60e1bb83cc85bb085fd9ce08819

commit c01b976a2461e60e1bb83cc85bb085fd9ce08819
Author: hiroshige <hiroshige@chromium.org>
Date: Mon Jul 04 11:34:20 2016

Add unit tests for revalidating ImageResource

BUG=625597,  618623 

Review-Url: https://codereview.chromium.org/2101103004
Cr-Commit-Position: refs/heads/master@{#403666}

[modify] https://crrev.com/c01b976a2461e60e1bb83cc85bb085fd9ce08819/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp

Project Member

Comment 2 by bugdroid1@chromium.org, Jul 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90

commit 36f4eb81d4a791a8e3dfea4ba2418465d30bcc90
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Tue Jul 19 09:59:30 2016

Remove duplication of encoded image data

Now there are at least two encoded image data: one is in Image/ImageResource as
SharedBuffer and the other is in DeferredImageDecoder as SkRWBuffer. This CL
removes former when possible (non-icon bitmaps), and generate the SharedBuffer
from the SkRWBuffer if needed.

Design Doc: https://docs.google.com/document/d/1v0yTAZ6wkqX2U_M6BNIGUJpM1s0TIw1VsqpxoL7aciY/edit?usp=sharing

BUG= 618623 
TEST=blink_platform_unittests --gtest_filter=BitmapImageTest.*:ImageDecoderTest.*

Review-Url: https://codereview.chromium.org/2054643003
Cr-Commit-Position: refs/heads/master@{#406238}

[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/core/fetch/ImageResource.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/core/fetch/ImageResource.h
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/core/fetch/Resource.h
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/SharedBufferChunkReader.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/SharedBufferChunkReader.h
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/graphics/BitmapImage.h
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/graphics/Image.h
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/graphics/ImageSource.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/graphics/ImageSource.h
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.h
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/mhtml/MHTMLParser.cpp
[modify] https://crrev.com/36f4eb81d4a791a8e3dfea4ba2418465d30bcc90/third_party/WebKit/Source/platform/mhtml/MHTMLParser.h

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c3dc43ed9905a2225780ff466706cfd3044f62ce

commit c3dc43ed9905a2225780ff466706cfd3044f62ce
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Thu Jul 28 08:11:19 2016

Simplify the condition for destroyDecodedData()

This CL simplifies the condition for destroyDecodedData(). When an error
occurs, |m_image| must be null and the condition for |m_image| doesn't
make sense.

This CL also fixes another if condition and inserts DCHECK based on the
above assumption.

BUG= 618623 , 631321
TEST=webkit_unit_tests --gtest_filter=ImageResourceTest.*

Review-Url: https://codereview.chromium.org/2176603002
Cr-Commit-Position: refs/heads/master@{#408358}

[modify] https://crrev.com/c3dc43ed9905a2225780ff466706cfd3044f62ce/third_party/WebKit/Source/core/fetch/ImageResource.cpp

Status: Fixed (was: Started)
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2

commit 66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Fri Oct 21 08:57:17 2016

ImageResource: Reset the encoded image size after receiving all data

Before this CL, an ImageResource's encoded image size remains non-zero
even after the encoded data is cleared. This CL fixes this to make
Resource::onMemoryDump report more accurate size.

BUG= 618623 ,  643135 
TEST=webkit_unit_tests --gtest_filter=ImageResourceTest.*

Review-Url: https://chromiumcodereview.appspot.com/2393113002
Cr-Commit-Position: refs/heads/master@{#426754}

[modify] https://crrev.com/66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2/third_party/WebKit/Source/core/fetch/ImageResource.cpp
[modify] https://crrev.com/66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
[modify] https://crrev.com/66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2/third_party/WebKit/Source/core/fetch/Resource.cpp
[modify] https://crrev.com/66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2/third_party/WebKit/Source/core/fetch/Resource.h

Sign in to add a comment