зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1195653 - Part1.1: Dump SecondaryEffects (EffectTypes::MASK) on Layerscope viewer. r=dglastonbury (v2, carry r+)
This commit is contained in:
Родитель
3502d91cf0
Коммит
454f308775
|
@ -872,9 +872,11 @@ NS_IMPL_ISUPPORTS(DebugDataSender::SendTask, nsIRunnable);
|
|||
* 2. SendEffectChain
|
||||
* 1. SendTexturedEffect
|
||||
* -> SendTextureSource
|
||||
* 2. SendYCbCrEffect
|
||||
* 2. SendMaskEffect
|
||||
* -> SendTextureSource
|
||||
* 3. SendColor
|
||||
* 3. SendYCbCrEffect
|
||||
* -> SendTextureSource
|
||||
* 4. SendColor
|
||||
*/
|
||||
class SenderHelper
|
||||
{
|
||||
|
@ -918,6 +920,9 @@ private:
|
|||
static void SendTexturedEffect(GLContext* aGLContext,
|
||||
void* aLayerRef,
|
||||
const TexturedEffect* aEffect);
|
||||
static void SendMaskEffect(GLContext* aGLContext,
|
||||
void* aLayerRef,
|
||||
const EffectMask* aEffect);
|
||||
static void SendYCbCrEffect(GLContext* aGLContext,
|
||||
void* aLayerRef,
|
||||
const EffectYCbCr* aEffect);
|
||||
|
@ -1123,6 +1128,24 @@ SenderHelper::SendTexturedEffect(GLContext* aGLContext,
|
|||
SendTextureSource(aGLContext, aLayerRef, source, texID, false);
|
||||
}
|
||||
|
||||
void
|
||||
SenderHelper::SendMaskEffect(GLContext* aGLContext,
|
||||
void* aLayerRef,
|
||||
const EffectMask* aEffect)
|
||||
{
|
||||
TextureSourceOGL* source = aEffect->mMaskTexture->AsSourceOGL();
|
||||
if (!source) {
|
||||
return;
|
||||
}
|
||||
|
||||
GLuint texID = GetTextureID(aGLContext, source);
|
||||
if (IsTextureIdContainsInList(texID)) {
|
||||
return;
|
||||
}
|
||||
|
||||
SendTextureSource(aGLContext, aLayerRef, source, texID, false);
|
||||
}
|
||||
|
||||
void
|
||||
SenderHelper::SendYCbCrEffect(GLContext* aGLContext,
|
||||
void* aLayerRef,
|
||||
|
@ -1188,8 +1211,11 @@ SenderHelper::SendEffectChain(GLContext* aGLContext,
|
|||
break;
|
||||
}
|
||||
|
||||
//const Effect* secondaryEffect = aEffectChain.mSecondaryEffects[EffectTypes::MASK];
|
||||
// TODO:
|
||||
if (aEffectChain.mSecondaryEffects[EffectTypes::MASK]) {
|
||||
const EffectMask* effectMask =
|
||||
static_cast<const EffectMask*>(aEffectChain.mSecondaryEffects[EffectTypes::MASK].get());
|
||||
SendMaskEffect(aGLContext, aEffectChain.mLayerRef, effectMask);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче