Closed
Bug 1195653
Opened 9 years ago
Closed 9 years ago
[LayerScope] Dump SecondaryEffects (EffectTypes::MASK) on Layerscope viewer
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: chenpighead, Assigned: chenpighead)
References
Details
(Whiteboard: [gfx-noted])
Attachments
(6 files, 10 obsolete files)
45 bytes,
text/x-github-pull-request
|
boris
:
review+
u459114
:
feedback+
|
Details | Review |
3.71 KB,
patch
|
chenpighead
:
review+
|
Details | Diff | Splinter Review |
10.40 KB,
patch
|
chenpighead
:
review+
|
Details | Diff | Splinter Review |
1.40 KB,
patch
|
chenpighead
:
review+
|
Details | Diff | Splinter Review |
10.64 KB,
patch
|
chenpighead
:
review+
|
Details | Diff | Splinter Review |
9.84 KB,
patch
|
u480271
:
review+
|
Details | Diff | Splinter Review |
In current version, we only dump PrimaryEffects on Layerscope. It would be great if we dump SecondaryEffects as well. SecondaryEffects provide additional information, such like Mask Layer, which can help engineers to verify whether a mask is correct or not.
Assignee | ||
Updated•9 years ago
|
Summary: [LayerScope] Dump SecondaryEffects on Layerscope viewer → [LayerScope] Dump SecondaryEffects (EffectTypes::MASK) on Layerscope viewer
Assignee | ||
Comment 1•9 years ago
|
||
With this wip, we can see mask layer attribute on LayerScope viewer now.
Assignee: nobody → jeremychen
Status: NEW → ASSIGNED
Comment on attachment 8649854 [details] [diff] [review] [wip] Dump SecondaryEffects EffectTypes::Mask on LayerScope viewer Review of attachment 8649854 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/LayerScope.cpp @@ +1068,5 @@ > + > + GLuint texID = GetTextureID(aGLContext, source); > + if (IsTextureIdContainsInList(texID)) { > + return; > + } Can we move IsTextureIdContainsInList into SendTextureSource? @@ +1144,5 @@ > > + if (aEffectChain.mSecondaryEffects[EffectTypes::MASK]) { > + const Effect* secondaryEffect = aEffectChain.mSecondaryEffects[EffectTypes::MASK]; > + const EffectMask* effectMask = > + static_cast<const EffectMask*>(secondaryEffect); const EffectMask* effectMask = static_cast<const EffectMask*>(aEffectChain.mSecondaryEffects[EffectTypes::MASK].get());
Assignee | ||
Comment 3•9 years ago
|
||
Use SendTextureSource() to send mask effect to layerscope viewer.
Attachment #8649854 -
Attachment is obsolete: true
Attachment #8662825 -
Flags: feedback?(cku)
Assignee | ||
Comment 4•9 years ago
|
||
Since we always check IsTextureIdContainsInList before SendTextureSource(), move IsTextureIdContainsInList into SendTextureSource().
Attachment #8662827 -
Flags: feedback?(cku)
Comment on attachment 8662827 [details] [diff] [review] Part2: Move IsTextureIdContainsInList into SendTextureSource. (v1) Review of attachment 8662827 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/LayerScope.cpp @@ +1117,5 @@ > return; > } > > +#ifdef MOZ_WIDGET_GONK > + GLuint texID = GetTextureID(aGLContext, aSource); Move this statement into SendGraphicBuffer?
Attachment #8662827 -
Flags: feedback?(cku) → feedback+
Comment on attachment 8662825 [details] [diff] [review] Part1.1: Dump SecondaryEffects (EffectTypes::MASK) on Layerscope viewer (v2) Review of attachment 8662825 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/LayerScope.cpp @@ +1145,5 @@ > + } > + > + SendTextureSource(aGLContext, aLayerRef, source, texID, false); > +} > + How to know a texture is a color one or a mask one at viewer side?
Attachment #8662825 -
Flags: feedback?(cku) → feedback+
Comment hidden (obsolete) |
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to C.J. Ku[:cjku] from comment #5) > Comment on attachment 8662827 [details] [diff] [review] > Part2: Move IsTextureIdContainsInList into SendTextureSource. (v1) > > Review of attachment 8662827 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: gfx/layers/LayerScope.cpp > @@ +1117,5 @@ > > return; > > } > > > > +#ifdef MOZ_WIDGET_GONK > > + GLuint texID = GetTextureID(aGLContext, aSource); > > Move this statement into SendGraphicBuffer? Good idea. Thanks for the feedback! :)
Assignee | ||
Comment 9•9 years ago
|
||
(In reply to C.J. Ku[:cjku] from comment #6) > Comment on attachment 8662825 [details] [diff] [review] > Part1: Dump SecondaryEffects (EffectTypes::MASK) on Layerscope viewer (v2) > > Review of attachment 8662825 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: gfx/layers/LayerScope.cpp > @@ +1145,5 @@ > > + } > > + > > + SendTextureSource(aGLContext, aLayerRef, source, texID, false); > > +} > > + > > How to know a texture is a color one or a mask one at viewer side? I'm considering sending this information from gecko to layerscope viewer through protobuf. Still debug my wip. I'll send feedback request once it is ready.
Assignee | ||
Updated•9 years ago
|
Attachment #8662825 -
Attachment description: Part1: Dump SecondaryEffects (EffectTypes::MASK) on Layerscope viewer (v2) → Part1.1: Dump SecondaryEffects (EffectTypes::MASK) on Layerscope viewer (v2)
Assignee | ||
Comment 10•9 years ago
|
||
Since we always check IsTextureIdContainsInList before SendTextureSource(), move IsTextureIdContainsInList into SendTextureSource().
Attachment #8662827 -
Attachment is obsolete: true
Assignee | ||
Comment 11•9 years ago
|
||
Attachment #8663588 -
Flags: feedback?(cku)
Assignee | ||
Comment 12•9 years ago
|
||
Auto generated files.
Assignee | ||
Comment 13•9 years ago
|
||
Attachment #8663592 -
Flags: feedback?(cku)
Assignee | ||
Comment 14•9 years ago
|
||
Attachment #8663596 -
Flags: feedback?(cku)
Comment 15•9 years ago
|
||
Comment on attachment 8663592 [details] [diff] [review] Part1.5: Send isMask info to LayerScope viewer by TexturePacket. (v1) Review of attachment 8663592 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/LayerScope.cpp @@ +531,5 @@ > mTarget(target), > mName(name), > mContextAddress(reinterpret_cast<intptr_t>(cx)), > + mDatasize(0), > + mPacket(Move(aPacket)) Why don't you just pass a boolean parameter,aIsMaskTexture, here? @@ +1168,5 @@ > TextureSourceOGL* sourceCr = sourceYCbCr->GetSubSource(Cr)->AsSourceOGL(); > > + auto packet = MakeUnique<layerscope::Packet>(); > + > + SendTextureSource(aGLContext, aLayerRef, sourceY, false, Move(packet)); Move the same unique_ptr three times?
Attachment #8663592 -
Flags: feedback?(cku) → feedback-
Comment 16•9 years ago
|
||
Comment on attachment 8663588 [details] [diff] [review] Part1.3: Add isMask attribute field to LayerScopePacket.proto. (v1) Review of attachment 8663588 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/protobuf/LayerScopePacket.proto @@ +31,5 @@ > optional uint64 glcontext = 8; > optional bytes data = 9; > + > + // Texture effect attributes (10 to 19) > + // TODO: reserved for texture effect attributes, see Bug 1205521 reserved for primary textured effect.
Attachment #8663588 -
Flags: feedback?(cku) → feedback+
Attachment #8663596 -
Flags: feedback?(cku) → feedback-
Assignee | ||
Comment 17•9 years ago
|
||
(In reply to C.J. Ku[:cjku] from comment #15) > Comment on attachment 8663592 [details] [diff] [review] > Part1.5: Send isMask info to LayerScope viewer by TexturePacket. (v1) > > Review of attachment 8663592 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: gfx/layers/LayerScope.cpp > @@ +531,5 @@ > > mTarget(target), > > mName(name), > > mContextAddress(reinterpret_cast<intptr_t>(cx)), > > + mDatasize(0), > > + mPacket(Move(aPacket)) > > Why don't you just pass a boolean parameter,aIsMaskTexture, here? In this bug, I think only passing a boolean is sufficient. However, if I intend to dump secondary mask effect attributes in SendMaskEffect() (see Bug 1205521) by texture packet, the unique_ptr and move operator would be needed. So, I kind of doing this to create the infrastructure for Bug 1205521. Is that okay if I keep the infrastructure but adding some comments here? > @@ +1168,5 @@ > > TextureSourceOGL* sourceCr = sourceYCbCr->GetSubSource(Cr)->AsSourceOGL(); > > > > + auto packet = MakeUnique<layerscope::Packet>(); > > + > > + SendTextureSource(aGLContext, aLayerRef, sourceY, false, Move(packet)); > > Move the same unique_ptr three times? This is definitely wrong.
Assignee | ||
Comment 18•9 years ago
|
||
Attachment #8663588 -
Attachment is obsolete: true
Attachment #8664059 -
Flags: feedback+
Assignee | ||
Comment 19•9 years ago
|
||
Attachment #8663592 -
Attachment is obsolete: true
Attachment #8664060 -
Flags: feedback?(cku)
Assignee | ||
Comment 20•9 years ago
|
||
Comment on attachment 8663596 [details] [review] PR for LayerScope: Show mask effect on LayerScope viewer. (v2) Address the feedback comments.
Attachment #8663596 -
Attachment description: Part2: Show mask effect on LayerScope viewer. (v1) → Part2: Show mask effect on LayerScope viewer. (v2)
Attachment #8663596 -
Flags: feedback- → feedback?(cku)
Assignee | ||
Comment 21•9 years ago
|
||
I intend to primary/secondary effect attributes by texture packet (see Bug 1205521). So, the unique_ptr and move operator is used here as an infrastructure for Bug 1205521. Comments would be removed after Bug 1205521.
Attachment #8664060 -
Attachment is obsolete: true
Attachment #8664060 -
Flags: feedback?(cku)
Attachment #8664115 -
Flags: feedback?(cku)
Attachment #8664115 -
Flags: feedback?(cku) → feedback+
Attachment #8663596 -
Flags: feedback?(cku) → feedback+
Assignee | ||
Updated•9 years ago
|
Attachment #8662825 -
Flags: review?(dglastonbury)
Assignee | ||
Updated•9 years ago
|
Attachment #8663584 -
Attachment description: Part1.2: Move IsTextureIdContainsInList into SendTextureSource. (v2) → Part1.2: Move IsTextureIdContainsInList into SendTextureSource. (carry f+:cku, v2)
Attachment #8663584 -
Flags: review?(dglastonbury)
Attachment #8663584 -
Flags: feedback+
Assignee | ||
Updated•9 years ago
|
Attachment #8664059 -
Flags: review?(dglastonbury)
Assignee | ||
Updated•9 years ago
|
Attachment #8663590 -
Flags: review?(dglastonbury)
Assignee | ||
Updated•9 years ago
|
Attachment #8664115 -
Flags: review?(dglastonbury)
Assignee | ||
Updated•9 years ago
|
Attachment #8663596 -
Flags: review?(boris.chiou)
Updated•9 years ago
|
Attachment #8663596 -
Flags: review?(boris.chiou) → review+
Assignee | ||
Updated•9 years ago
|
Attachment #8663596 -
Attachment description: Part2: Show mask effect on LayerScope viewer. (v2) → PR for LayerScope: Show mask effect on LayerScope viewer. (v2)
Comment 22•9 years ago
|
||
Comment on attachment 8662825 [details] [diff] [review] Part1.1: Dump SecondaryEffects (EffectTypes::MASK) on Layerscope viewer (v2) Review of attachment 8662825 [details] [diff] [review]: ----------------------------------------------------------------- Comments aren't directly related to the code in the patch. ::: gfx/layers/LayerScope.cpp @@ +1139,5 @@ > + return; > + } > + > + GLuint texID = GetTextureID(aGLContext, source); > + if (IsTextureIdContainsInList(texID)) { `IsTextureIdContainsInList` is a bad name for this function. I've looked over the use of the texture id list and would like to suggest some changes: * change std::list<GLuint> SenderHelper::sTextureIdList to std::vector<GLuint> SenderHelper::sSentTextureIds (A vector is fine here and preferable to list. sTextureIdList doesn't document what the data is, which is a texture ids that have already been sent) * SenderHelper::ClearTextureIdList() can become: void SenderHelper::ClearSentTextureIds() { sSentTextureIds.clear(); } or, just inline sSentTextureIds.clear() instead of calling ClearSentTextureIds() * SenderHelper::IsTextureIdContainsInList() can become: bool SenderHelper::HasTextureIdBeenSent(GLuint aTextureId) { return std::find(sSentTextureIds.begin(), sSentTextureIds.end(), aTextureId) != sSentTextureIds.end(); }
Attachment #8662825 -
Flags: review?(dglastonbury) → review+
Attachment #8663584 -
Flags: review?(dglastonbury) → review+
Attachment #8664059 -
Flags: review?(dglastonbury) → review+
Attachment #8663590 -
Flags: review?(dglastonbury) → review+
Comment 23•9 years ago
|
||
Comment on attachment 8664115 [details] [diff] [review] Part1.5: Send isMask info to LayerScope viewer by TexturePacket. (v2) Review of attachment 8664115 [details] [diff] [review]: ----------------------------------------------------------------- A lot of changes and duplication of packet creation/ownership to just set `ismask` flag. I would prefer to pass flag to SendTextureSource(). ::: gfx/layers/LayerScope.cpp @@ +1069,5 @@ > size, > shaderConfig, aFlipY); > gLayerScopeManager.GetSocketManager()->AppendDebugData( > new DebugGLTextureData(aGLContext, aLayerRef, textureTarget, > + texID, img, Move(aPacket))); Does this need to be a Move? The parameter is Move'd again in the initializer list of DebugGLTextureData. @@ +1149,5 @@ > > + auto packet = MakeUnique<layerscope::Packet>(); > + layerscope::TexturePacket* texturePacket = packet->mutable_texture(); > + > + texturePacket->set_ismask(true); Exposing packet creation seems like overkill to have this one place that sets a flag. Can't `ismask` become a parameter to SendTextureSource() instead?
Attachment #8664115 -
Flags: review?(dglastonbury) → review-
Assignee | ||
Comment 24•9 years ago
|
||
Rebased.
Attachment #8662825 -
Attachment is obsolete: true
Attachment #8667729 -
Flags: review+
Assignee | ||
Comment 25•9 years ago
|
||
Rebased. Address reviewer's comments.
Attachment #8667731 -
Flags: review+
Assignee | ||
Comment 26•9 years ago
|
||
Rebased.
Attachment #8663584 -
Attachment is obsolete: true
Attachment #8664059 -
Attachment is obsolete: true
Attachment #8667732 -
Flags: review+
Assignee | ||
Comment 27•9 years ago
|
||
Rebased.
Attachment #8663590 -
Attachment is obsolete: true
Attachment #8667733 -
Flags: review+
Assignee | ||
Comment 28•9 years ago
|
||
Rebased. Use bool parameter isMask instead of exposing packet creation in SendMaskEffect(). Exposing packet creation in SendTexturedEffect(), SendMaskEffect() is a solution for Bug 1205521, but not for this bug. Perhaps it would be better to do it in Bug 1205521.
Attachment #8664115 -
Attachment is obsolete: true
Attachment #8667738 -
Flags: review?(dglastonbury)
Assignee | ||
Comment 29•9 years ago
|
||
Hi Dan, could you take a look at Part1.5 again? Your comments have been addressed. Thanks.
Flags: needinfo?(dglastonbury)
Attachment #8667738 -
Flags: review?(dglastonbury) → review+
Assignee | ||
Comment 31•9 years ago
|
||
try looks positove: https://treeherder.mozilla.org/#/jobs?repo=try&revision=a6139d0e1872 Please check-in gecko patchs (Part1.1~1.5). Thanks.
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 32•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c94845fed57a https://hg.mozilla.org/integration/mozilla-inbound/rev/05e87501ca2f https://hg.mozilla.org/integration/mozilla-inbound/rev/e9bd3f3709c3 https://hg.mozilla.org/integration/mozilla-inbound/rev/de66b7117fb4 https://hg.mozilla.org/integration/mozilla-inbound/rev/2aeb63e0f392
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c94845fed57a https://hg.mozilla.org/mozilla-central/rev/05e87501ca2f https://hg.mozilla.org/mozilla-central/rev/e9bd3f3709c3 https://hg.mozilla.org/mozilla-central/rev/de66b7117fb4 https://hg.mozilla.org/mozilla-central/rev/2aeb63e0f392
Assignee | ||
Comment 34•9 years ago
|
||
Hi boris, could you help merge PR for layerscope viewer? Thanks.
Flags: needinfo?(boris.chiou)
Comment 35•9 years ago
|
||
Layerscope viewer code merged: https://github.com/mozilla/layerscope/commit/bb45cbce62f43bfa82d5accbe521846498c9b9ad
Flags: needinfo?(boris.chiou)
Assignee | ||
Updated•9 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•