| Index: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| index 13efb128ed04290fa71be195e82336d98328502a..f8ea5f0f47df002f98d8e050a42cf033f04df66d 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| @@ -934,6 +934,7 @@ void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info)
|
| m_gl->ReleaseTexImage2DCHROMIUM(info->parameters.target, info->imageId);
|
| m_gl->DestroyImageCHROMIUM(info->imageId);
|
| info->imageId = 0;
|
| + info->gpuMemoryBufferId = -1;
|
| }
|
| }
|
|
|
| @@ -972,10 +973,14 @@ DrawingBuffer::TextureInfo DrawingBuffer::createTextureAndAllocateMemory(const I
|
|
|
| GLuint textureId = createColorTexture(parameters);
|
| m_gl->BindTexImage2DCHROMIUM(parameters.target, imageId);
|
| + GLint gpuMemoryBufferId = -1;
|
| + m_gl->GetImageivCHROMIUM(imageId, GC3D_GPU_MEMORY_BUFFER_ID, &gpuMemoryBufferId);
|
| + DCHECK_NE(-1, gpuMemoryBufferId);
|
|
|
| TextureInfo info;
|
| info.textureId = textureId;
|
| info.imageId = imageId;
|
| + info.gpuMemoryBufferId = gpuMemoryBufferId;
|
| info.parameters = parameters;
|
| clearChromiumImageAlpha(info);
|
| return info;
|
| @@ -1002,6 +1007,12 @@ void DrawingBuffer::resizeTextureMemory(TextureInfo* info, const IntSize& size)
|
| if (info->imageId) {
|
| m_gl->BindTexture(info->parameters.target, info->textureId);
|
| m_gl->BindTexImage2DCHROMIUM(info->parameters.target, info->imageId);
|
| +
|
| + GLint gpuMemoryBufferId = -1;
|
| + m_gl->GetImageivCHROMIUM(info->imageId, GC3D_GPU_MEMORY_BUFFER_ID, &gpuMemoryBufferId);
|
| + DCHECK_NE(-1, gpuMemoryBufferId);
|
| + info->gpuMemoryBufferId = gpuMemoryBufferId;
|
| +
|
| clearChromiumImageAlpha(*info);
|
| return;
|
| }
|
|
|