Closed
Bug 1210182
Opened 9 years ago
Closed 9 years ago
Implement GrallocTextureHostBasic
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
Attachments
(2 files, 9 obsolete files)
770 bytes,
patch
|
Details | Diff | Splinter Review | |
30.62 KB,
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
On b2g, there is a case that we do not want to use GPU. See Bug 1206583. If we still want to use gralloc, we need GrallocTextureHostBasic like MacIOSurfaceTextureHostBasic.
Assignee | ||
Comment 1•9 years ago
|
||
By applying the patch, master flame-kk was booted, but it had the following problems.
- colors are reverted
- video playback / camera preview causes system reboot.
(They are heavily depends on gralloc implementation).
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → sotaro.ikeda.g
Comment 3•9 years ago
|
||
Cc Cervantes. This might also help we run emulator without GL support.
Component: Geolocation → Graphics: Layers
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8668129 -
Attachment is obsolete: true
Assignee | ||
Comment 5•9 years ago
|
||
It lacks yub support and necessary fence handling.
Attachment #8669127 -
Attachment is obsolete: true
Assignee | ||
Comment 6•9 years ago
|
||
Enable video on full hwc composition case. It seems to have a lot of flickering. It seems to be caused by lacking fence handling.
Attachment #8669130 -
Attachment is obsolete: true
Assignee | ||
Comment 7•9 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro PTO 5/Oct - 14/Oct] from comment #6)
> Created attachment 8669154 [details] [diff] [review]
> wip patch - Add GrallocTextureHostBasic
>
> Enable video on full hwc composition case. It seems to have a lot of
> flickering. It seems to be caused by lacking fence handling.
I understand that it is not come from fence. On basic compositor, DisplaySurface::QueueBuffer() is always called even when hwc full composition case. When hwc full composition case, the QueueBuffer() should not be called.
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro PTO 5/Oct - 14/Oct] from comment #7)
>
> I understand that it is not come from fence. On basic compositor,
> DisplaySurface::QueueBuffer() is always called even when hwc full
> composition case. When hwc full composition case, the QueueBuffer() should
> not be called.
Sorry, it is wrong. DisplaySurface::QueueBuffer() is not called in full hwc composition. I am going to investigate more.
Assignee | ||
Comment 9•9 years ago
|
||
The flicker was caused by blitComposite handling code. Current implementation expects EGLSurface. It is GonkDisplayJB::UpdateDispSurface(). By fixing it, the flicker was fixed.
Assignee | ||
Comment 10•9 years ago
|
||
Fixed flicker during full hwc composition.
Video rendering by BasicCompositor is not supported yet.
Attachment #8669154 -
Attachment is obsolete: true
Assignee | ||
Comment 11•9 years ago
|
||
Add video rendering with BasicCompositor.
By this patch, all necessary capabilities seems to be implemented.
I tested a little bit on master flame-kk. From it, BasicCompositor seems to have some problem around invalidation.
Attachment #8669249 -
Attachment is obsolete: true
Assignee | ||
Comment 13•9 years ago
|
||
Comment on attachment 8669369 [details] [diff] [review]
patch - Add GrallocTextureHostBasic
:nical, I use GrallocImage to render video with BasicCompositor. What is a preferred way?
Attachment #8669369 -
Flags: feedback?(nical.bugzilla)
Assignee | ||
Updated•9 years ago
|
Attachment #8669127 -
Attachment is obsolete: false
Comment 14•9 years ago
|
||
Comment on attachment 8669369 [details] [diff] [review]
patch - Add GrallocTextureHostBasic
Review of attachment 8669369 [details] [diff] [review]:
-----------------------------------------------------------------
I would prefer to have GrallocTextureHostBasic handle locking and unlocking the graphic buffer and create a generic WrappingBasicTextureSource (or something like that) which can be created around a pointer and that is not gralloc-specific (we could also use it with BufferTextureHost for instance).
I am not super found of the idea that this TextureHost/Source pair can only be used with video (since the underlying buffer is only unlocked when the TextureHost is destroyed, it can't be used for painting and you can only know that by carefully looking at its code).
Since compositing is happening synchronously, you should be able to lock the graphic buffer before DrawQuad and unlock it after it (so in TextureHost::Lock and TextureHost::Unlock) which is a less surprising behavior and would make it possible to use this kind of texture for painting.
Let's say f- as a first impression, but since this is only for a not-very-well-defined (experimental?) platform, it's possible that you'll convince me to change my mind.
Attachment #8669369 -
Flags: feedback?(nical.bugzilla) → feedback-
Assignee | ||
Comment 15•9 years ago
|
||
Updated as to use DataTextureSourceBasic and removed dairy hack to GrallocImage.
At first, I tried to implement lock/unlock semantics clearly. But TextureHost does not implement it clearly and TextureHost seems to assume that buffer mapping is actually bound to TexureSource. Therefore the patch implements it to similar level.
Attachment #8669369 -
Attachment is obsolete: true
Assignee | ||
Comment 17•9 years ago
|
||
Comment on attachment 8678748 [details] [diff] [review]
patch - Add GrallocTextureHostBasic
nical, how about this patch.
Attachment #8678748 -
Flags: review?(nical.bugzilla)
Comment 18•9 years ago
|
||
Comment on attachment 8678748 [details] [diff] [review]
patch - Add GrallocTextureHostBasic
Review of attachment 8678748 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/basic/GrallocTextureHostBasic.cpp
@@ +99,5 @@
> + aFlags & TextureFlags::RB_SWAPPED);
> + mSize = gfx::IntSize(grallocBuffer->getWidth(), grallocBuffer->getHeight());
> + mCropSize = mSize;
> + } else {
> + printf_stderr("gralloc buffer is nullptr");
nit: you should add a \n at the end or use one of our warning macros, otherwise the log won't show up when you expect it.
Attachment #8678748 -
Flags: review?(nical.bugzilla) → review+
Assignee | ||
Comment 19•9 years ago
|
||
Apply the comment.
Attachment #8678748 -
Attachment is obsolete: true
Assignee | ||
Comment 20•9 years ago
|
||
Fix build failure on linux. Carry "r=nical".
Attachment #8679189 -
Attachment is obsolete: true
Attachment #8679198 -
Flags: review+
Assignee | ||
Comment 21•9 years ago
|
||
Comment 22•9 years ago
|
||
Comment 23•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•