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
This commit is contained in:
Vincent Liu 2015-05-07 15:26:26 +08:00
parent 406d810b42
commit be4b3328fc

View File

@ -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<DataSourceSurface> 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<DataSourceSurface> img =
aGLContext->ReadTexImageHelper()->ReadTexImage(0, textureTarget,
size,
shaderConfig, aFlipY);
sTextureIdList.push_back(textureId);
WebSocketHelper::GetSocketManager()->AppendDebugData(
new DebugGLTextureData(aGLContext, aLayerRef, textureTarget,