Closed
Bug 916116
Opened 11 years ago
Closed 11 years ago
Follow up fix of Bug 912134 Comment 86
Categories
(Firefox OS Graveyard :: General, defect, P1)
Tracking
(blocking-b2g:koi+, firefox25 wontfix, firefox26 fixed, firefox27 fixed, b2g-v1.2 fixed)
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
Attachments
(4 files)
(deleted),
patch
|
bjacob
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bjacob
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #912134 +++
This bug is for a follow up of Bug 912134 Comment 86.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → sotaro.ikeda.g
Comment 1•11 years ago
|
||
Copy of the relevant comment:
Comment on attachment 804019 [details] [diff] [review] [diff] [review]
patch v4 - allocate texture per CompositableHost
Review of attachment 804019 [details] [diff] [review] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/composite/CompositableHost.h
@@ +59,5 @@
>
> /**
> + * A base class for doing CompositableHost and platform dependent task on TextureHost.
> + */
> +class CompositableQuirks : public RefCounted<CompositableQuirks>
This class really needs a more explicit name but we can rename it later. Let's not spend time debating names now, this looks like an important patch.
::: gfx/layers/ipc/CompositableTransactionParent.cpp
@@ +242,5 @@
> + // set CompositableQuirks
> + // on gonk, create EGLImage if possible.
> + // create EGLImage during buffer swap could reduce the graphic driver's task
> + // during rendering.
> + tex->SetCompositableQuirks(compositable->GetCompositableQuirks());
It looks like this call should be in AddTextureHost
::: gfx/layers/opengl/TextureHostOGL.cpp
@@ +1122,2 @@
> DeleteTextures();
> +#if 1
Remove the useless #if 1 before landing
@@ +1156,5 @@
> MOZ_ASSERT(gl());
> gl()->MakeCurrent();
>
> + mQuirks->SetCompositor(mCompositor);
> + GLuint tex = static_cast<CompositableQuirksGonkOGL*>(mQuirks.get())->GetTexture();
I see a pattern of doing the two lines above in many places. You should wrap this in a GetGLTexture() method in the Gralloc TextureHost classes.
Comment 2•11 years ago
|
||
CompositableQuirks' role is to hold backend specific textures at the level of Compositable (which is backend independent). How about naming it "CompositableTextureSlot" or "CompositableTextureContainer"?
Comment 3•11 years ago
|
||
Do we want to hardcode the idea that it's only for temporary textures (as it currently is) or could we leave it more vague, like CompositableBackendSpecificData ?
Comment 4•11 years ago
|
||
I am worried that if we introduce the idea of vague "user data", people will be tempted to use it for dirty hacks and that it will be tempting to fix a problem that is first seen on a given platform there, rather than fixing the problem at the platform-independent level which is always a better solution.
If right now we only need it for temporary textures, I would prefer being strict and explicit about what it is meant to do.
Comment 5•11 years ago
|
||
OK. But on the other hand, CompositableTextureContainer seems confusing because it will sound like this is where all textures used for all compositables should go. So it seems nontrivial to find a specific name that does more good than harm. CompositableBackendSpecificTemporaryTexture is a bit long...
Comment 6•11 years ago
|
||
Attachment #805263 -
Flags: review?
Updated•11 years ago
|
Attachment #805263 -
Flags: review? → review?(bjacob)
Comment 7•11 years ago
|
||
Attachment #805264 -
Flags: review?(sotaro.ikeda.g)
Comment 8•11 years ago
|
||
Probably the 3 most simple and low risk patches that I ever wrote
Attachment #805266 -
Flags: review?(sotaro.ikeda.g)
Comment 9•11 years ago
|
||
Comment on attachment 805263 [details] [diff] [review]
remove #if 1
Review of attachment 805263 [details] [diff] [review]:
-----------------------------------------------------------------
* thinks very, very hard ... *
OK, this should work.
Attachment #805263 -
Flags: review?(bjacob) → review+
Comment 10•11 years ago
|
||
(In reply to Benoit Jacob [:bjacob] from comment #5)
> OK. But on the other hand, CompositableTextureContainer seems confusing
> because it will sound like this is where all textures used for all
> compositables should go. So it seems nontrivial to find a specific name that
> does more good than harm. CompositableBackendSpecificTemporaryTexture is a
> bit long...
That is true. CompositableBackendSpecificData is already a good improvement over CompositableQuirks so it's fine by me (and not worth spending time arguing over).
Assignee | ||
Comment 11•11 years ago
|
||
Comment on attachment 805266 [details] [diff] [review]
Avoid some code dupplication in gralloc TextureHost
Looks good. Thanks.
Attachment #805266 -
Flags: review?(sotaro.ikeda.g) → review+
Assignee | ||
Updated•11 years ago
|
Attachment #805264 -
Flags: review?(sotaro.ikeda.g) → review+
Comment 12•11 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/362ba1a32ec8
https://hg.mozilla.org/integration/b2g-inbound/rev/be3d833564fb
https://hg.mozilla.org/integration/b2g-inbound/rev/2f8b5a47a1b8
Whiteboard: [leave open]
Comment 13•11 years ago
|
||
Comment 14•11 years ago
|
||
Attachment #811948 -
Flags: review?(bjacob)
Comment 15•11 years ago
|
||
Comment on attachment 811948 [details] [diff] [review]
Rename CompositableQuirks
Review of attachment 811948 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/composite/CompositableHost.h
@@ +291,5 @@
> protected:
> TextureInfo mTextureInfo;
> Compositor* mCompositor;
> Layer* mLayer;
> + RefPtr<CompositableBackendSpecificData> mQuirks;
Should not be named nQuirks anymore, then!
::: gfx/layers/composite/TextureHost.h
@@ +392,5 @@
> protected:
> uint64_t mID;
> RefPtr<TextureHost> mNextTexture;
> TextureFlags mFlags;
> + RefPtr<CompositableBackendSpecificData> mQuirks;
Same
::: gfx/layers/opengl/GrallocTextureHost.cpp
@@ +331,4 @@
> }
>
> void
> +GrallocTextureHostOGL::SetCompositableBackendSpecificData(CompositableBackendSpecificData* aQuirks)
Same
Attachment #811948 -
Flags: review?(bjacob) → review+
Comment 16•11 years ago
|
||
Fixed the remaining occurences of "quirk" and landed
https://hg.mozilla.org/integration/mozilla-inbound/rev/b6b561566a3e
Updated•11 years ago
|
Whiteboard: [leave open]
Comment 17•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3 Sprint 2 - 10/11
Comment 18•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/4f05f70b425c
https://hg.mozilla.org/releases/mozilla-aurora/rev/844e6581a968
https://hg.mozilla.org/releases/mozilla-aurora/rev/9e8d832f13b8
https://hg.mozilla.org/releases/mozilla-aurora/rev/65523793a6bf
status-b2g-v1.2:
--- → fixed
status-firefox25:
--- → wontfix
status-firefox26:
--- → fixed
status-firefox27:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•