Now the major problem I encounter is that sometime `IDCompositionDevice::CreateSurfaceFromHandle()` would fail and return `E_HANDLE` error, which causes nothing showing on the screen. This situation is intermittent, and have two situations. (1) can't create a surface in the beginning, and then the surface can be created successfully by using the same handle after a while (2) no matter how long we wait, it always fail to create the surface by using the same handle. The implementation details can be viewed [here](https://phabricator.services.mozilla.com/D151019). The brief introduction is that, (1) we duplicate it via IPC mechanism and sent it to the GPU process (2) call `IDCompositionDevice::CreateSurfaceFromHandle()` (in `RenderDcompSurfaceTextureHost::CreateSurfaceFromDevice()`) to construct the surface an use it in the DC layer tree. --- I've tried following ways (1) delay the timing of getting handle from the media engine (2) duplicate the handle by using `DUPLICATE_SAME_ACCESS` before sending the handle across IPC to ensure the handle alive (3) ask for a new handle whenever the media time changes, and send the new handle to GPU process But none of them works. Welcome for any help or suggestion because now I have no idea how to solve this problem :(
Bug 1771011 Comment 4 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Now the major problem I encounter is that sometime `IDCompositionDevice::CreateSurfaceFromHandle()` would fail and returns `E_HANDLE` error, which causes nothing showing on the screen. This situation is intermittent, and have two situations. (1) can't create a surface in the beginning, and then the surface can be created successfully by using the same handle after a while (2) no matter how long we wait, it always fail to create the surface by using the same handle. The implementation details can be viewed [here](https://phabricator.services.mozilla.com/D151019). The brief introduction is that, (1) we duplicate it via IPC mechanism and sent it to the GPU process (2) call `IDCompositionDevice::CreateSurfaceFromHandle()` (in `RenderDcompSurfaceTextureHost::CreateSurfaceFromDevice()`) to construct the surface an use it in the DC layer tree. --- I've tried following ways (1) delay the timing of getting handle from the media engine (2) duplicate the handle by using `DUPLICATE_SAME_ACCESS` before sending the handle across IPC to ensure the handle alive (3) ask for a new handle whenever the media time changes, and send the new handle to GPU process But none of them works. Welcome for any help or suggestion because now I have no idea how to solve this problem :(
Now the major problem I encounter is that sometime `IDCompositionDevice::CreateSurfaceFromHandle()` would fail and returns `E_HANDLE` error, which causes nothing showing on the screen. This situation is intermittent, and have two situations. (1) can't create a surface in the beginning, and then the surface can be created successfully by using the same handle after a while (2) no matter how long we wait, it always fail to create the surface by using the same handle. The implementation details can be viewed [here](https://phabricator.services.mozilla.com/D151019). The brief introduction is that, (1) we duplicate it via IPC mechanism and sent it to the GPU process (2) call `IDCompositionDevice::CreateSurfaceFromHandle()` (in `RenderDcompSurfaceTextureHost::CreateSurfaceFromDevice()`) to construct the surface an use it in the DC layer tree. --- I've tried following ways (1) delay the timing of getting handle from the media engine (2) duplicate the handle by using `DUPLICATE_SAME_ACCESS` before sending the handle across IPC to ensure the handle alive (3) ask for a new handle whenever the media time changes, and send the new handle to GPU process I also tried to (1) step in `IDCompositionDevice::CreateSurfaceFromHandle()` in disassembly mode via Visual Studio (2) use DebugView and Mftrace But none of them works or gave me useful information. Welcome for any help or suggestion because now I have no idea how to solve this problem :(
Now the major problem I encounter is that sometime `IDCompositionDevice::CreateSurfaceFromHandle()` would fail and returns `E_HANDLE` error, which causes nothing showing on the screen. This situation is intermittent, and have two situations. (1) can't create a surface in the beginning, and then the surface can be created successfully by using the same handle after a while (2) no matter how long we wait, it always fail to create the surface by using the same handle. The implementation details can be viewed [here](https://phabricator.services.mozilla.com/D151019). The brief introduction is that, (1) we duplicate it via IPC mechanism and sent it to the GPU process (2) call `IDCompositionDevice::CreateSurfaceFromHandle()` (in `RenderDcompSurfaceTextureHost::CreateSurfaceFromDevice()`) to construct the surface an use it in the DC layer tree. --- I've tried following ways (1) delay the timing of getting handle from the media engine (2) duplicate the handle by using `DUPLICATE_SAME_ACCESS` before sending the handle across IPC to ensure the handle alive (3) ask for a new handle whenever the media time changes, and send the new handle to GPU process I also tried to (1) step in `IDCompositionDevice::CreateSurfaceFromHandle()` in disassembly mode via Visual Studio (2) use DebugView and Mftrace But none of them works or gave me useful information. Welcome for any help or suggestion because now I have no idea how to solve this problem :(