| Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| index f7c810adfff5571870c7598933da21f956035568..597217d7f052d8c319099a8631d94493b8b438c2 100644
|
| --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
| @@ -4525,8 +4525,8 @@ void WebGLRenderingContextBase::texImageHelperImageBitmap(TexImageFunctionID fun
|
| }
|
| RefPtr<SkImage> skImage = bitmap->bitmapImage()->imageForCurrentFrame();
|
| SkPixmap pixmap;
|
| - std::unique_ptr<uint8_t[]> pixelData;
|
| uint8_t* pixelDataPtr = nullptr;
|
| + RefPtr<Uint8Array> pixelData;
|
| // In the case where an ImageBitmap is not texture backed, peekPixels() always succeed.
|
| // However, when it is texture backed and !canUseTexImageByGPU, we do a GPU read back.
|
| bool peekSucceed = skImage->peekPixels(&pixmap);
|
| @@ -4534,7 +4534,7 @@ void WebGLRenderingContextBase::texImageHelperImageBitmap(TexImageFunctionID fun
|
| pixelDataPtr = static_cast<uint8_t*>(pixmap.writable_addr());
|
| } else {
|
| pixelData = bitmap->copyBitmapData(bitmap->isPremultiplied() ? PremultiplyAlpha : DontPremultiplyAlpha);
|
| - pixelDataPtr = pixelData.get();
|
| + pixelDataPtr = pixelData->data();
|
| }
|
| Vector<uint8_t> data;
|
| bool needConversion = true;
|
|
|