|
|
Remove redundant reading and writing of data about SharedBuffer.
When decoding an image, the encoding data should be copied from SharedBuffer to SkRWBuffer,
and after the data is accepted completed, webcore thread can access the encoded data only
by generating SharedBuffer from SkRWBuffer. Obviously, there is redundant reading and writing
of data in the above process.
Depending on whether the vectors' capacity needs to be expanded, SharedBuffer can be divided
into several steps. In step, single thread writing and multi-threaded reading are safe. So only
in the step switch, synchronization should be make. This cost is light enough. Moreover, the
existing ROBufferSegmentReader also need to add a wide range of lock when reading.
In addition, SharedBuffer supports random access, while ROBufferSegmentReader only supports
forward or backward access by segment.
design doc: https://docs.google.com/document/d/12nBhu8HKjxnuUrfmIhXfTSdPcV1ieCKHmzaAvyOHGM0/edit
benchmark results:
https://docs.google.com/spreadsheets/d/1ThAJV33yZJMx9tp2CLKZ5tmkomXLJiBM4mfqFFOK4iQ/edit#gid=0
BUG= 727995
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1292 lines, -210 lines) |
Patch |
 |
M |
AUTHORS
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/resource/ImageResource.cpp
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/BUILD.gn
|
View
|
1
2
3
4
|
2 chunks |
+24 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/SharedBuffer.h
|
View
|
1
2
3
4
|
3 chunks |
+53 lines, -7 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/SharedBuffer.cpp
|
View
|
1
2
3
4
|
5 chunks |
+171 lines, -147 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/Source/platform/SharedBufferStep.h
|
View
|
1
2
|
1 chunk |
+164 lines, -0 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/Source/platform/SharedBufferStep.cpp
|
View
|
1
2
3
|
1 chunk |
+301 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/BitmapImage.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h
|
View
|
|
3 chunks |
+13 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
|
View
|
1
2
3
4
|
6 chunks |
+34 lines, -7 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
|
View
|
1
2
3
4
|
4 chunks |
+9 lines, -29 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/ImageSource.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/ImageSource.cpp
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/image-decoders/SegmentReader.h
|
View
|
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/image-decoders/SegmentReader.cpp
|
View
|
|
3 chunks |
+41 lines, -0 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/Source/platform/testing/DeferredImageDecodeBench.cpp
|
View
|
1
2
3
4
|
1 chunk |
+473 lines, -0 lines |
0 comments
|
Download
|
Total messages: 61 (44 generated)
|