Bug 621227 - Optimize thebes layer render function. r=vladimir a=approval2.0

--HG--
extra : rebase_source : e03927f5f491385725b8dc629060cc688cc299aa
This commit is contained in:
Oleg Romashin 2011-01-04 17:37:22 +02:00
Родитель bd342671db
Коммит a6e0cf5861
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -195,15 +195,16 @@ ThebesLayerBufferOGL::RenderTo(const nsIntPoint& aOffset,
float xres = mLayer->GetXResolution();
float yres = mLayer->GetYResolution();
program->Activate();
program->SetLayerOpacity(mLayer->GetEffectiveOpacity());
program->SetLayerTransform(mLayer->GetEffectiveTransform());
program->SetRenderOffset(aOffset);
program->SetTextureUnit(0);
nsIntRegionRectIterator iter(mLayer->GetEffectiveVisibleRegion());
while (const nsIntRect *iterRect = iter.Next()) {
nsIntRect quadRect = *iterRect;
program->Activate();
program->SetLayerQuadRect(quadRect);
program->SetLayerOpacity(mLayer->GetEffectiveOpacity());
program->SetLayerTransform(mLayer->GetEffectiveTransform());
program->SetRenderOffset(aOffset);
program->SetTextureUnit(0);
DEBUG_GL_ERROR_CHECK(gl());
quadRect.MoveBy(-GetOriginOffset());