From be4b3328fcfa9733c8d4d16777fa4f045e6b0ca8 Mon Sep 17 00:00:00 2001 From: Vincent Liu Date: Thu, 7 May 2015 15:26:26 +0800 Subject: [PATCH] Bug 1162395 - [LayerScope]: No need to read and send the texture when the same texture id contains in a frame. r=cku --HG-- extra : rebase_source : 2c4c6c4b7e76f261b66fad29fd146961dc65cc96 --- gfx/layers/LayerScope.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/gfx/layers/LayerScope.cpp b/gfx/layers/LayerScope.cpp index f758e765b48f..c4b912e66e6b 100644 --- a/gfx/layers/LayerScope.cpp +++ b/gfx/layers/LayerScope.cpp @@ -712,16 +712,15 @@ SenderHelper::SendTextureSource(GLContext* aGLContext, aGLContext->GetUIntegerv(LOCAL_GL_TEXTURE_BINDING_RECTANGLE, &textureId); } - gfx::IntSize size = aSource->GetSize(); - - // By sending 0 to ReadTextureImage rely upon aSource->BindTexture binding - // texture correctly. textureId is used for tracking in DebugGLTextureData. - RefPtr img = - aGLContext->ReadTexImageHelper()->ReadTexImage(0, textureTarget, - size, - shaderConfig, aFlipY); - if (!IsTextureIdContainsInList(textureId)) { + gfx::IntSize size = aSource->GetSize(); + + // By sending 0 to ReadTextureImage rely upon aSource->BindTexture binding + // texture correctly. textureId is used for tracking in DebugGLTextureData. + RefPtr img = + aGLContext->ReadTexImageHelper()->ReadTexImage(0, textureTarget, + size, + shaderConfig, aFlipY); sTextureIdList.push_back(textureId); WebSocketHelper::GetSocketManager()->AppendDebugData( new DebugGLTextureData(aGLContext, aLayerRef, textureTarget,