Skip to content

Commit 2ccb9f0

Browse files
author
Michael Brüning
committed
<third_party/WebKit> [Backport] Lock the bitmap before calling getPixels().
On calling getPixels() after decoding always return NULL as SkBitmap fpixels is set to NULL while copying. BUG=490549 TEST=Existing Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=195570 Task-number: QTBUG-48822 Change-Id: I7cb9add182524cb9a9093416b96d7e1843df7b70 Reviewed-by: Kai Koehne <[email protected]>
1 parent 2ee34ed commit 2ccb9f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

chromium/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ bool ImageFrameGenerator::decodeAndScale(const SkImageInfo& info, size_t index,
142142
ASSERT(bitmap.height() == scaledSize.height());
143143

144144
bool result = true;
145+
SkAutoLockPixels bitmapLock(bitmap);
145146
// Check to see if decoder has written directly to the memory provided
146147
// by Skia. If not make a copy.
147148
if (bitmap.getPixels() != pixels)

0 commit comments

Comments
 (0)