Open
Bug 1281259
Opened 8 years ago
Updated 2 years ago
Port DXVA to gfxConfig
Categories
(Core :: Graphics, defect, P3)
Tracking
()
NEW
People
(Reporter: ernest, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [gfx-noted])
Attachments
(2 files)
No description provided.
Reporter | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/60112/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/60112/
Attachment #8764064 -
Flags: review?(jmuizelaar)
Comment 2•8 years ago
|
||
https://reviewboard.mozilla.org/r/60112/#review56990 ::: gfx/thebes/gfxPlatform.cpp:2114 (Diff revision 1) > Preferences::GetBool("media.windows-media-foundation.use-dxva", true) && > #endif > NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, > discardFailureId, &status))) { > - if (status == nsIGfxInfo::FEATURE_STATUS_OK || gfxPrefs::HardwareVideoDecodingForceEnabled()) { > + if (status == nsIGfxInfo::FEATURE_STATUS_OK || gfxPrefs::HardwareVideoDecodingForceEnabled()) { > - sLayersSupportsHardwareVideoDecoding = true; > + hwVideoDecFeature.EnableByDefault(); This should probably move out of the if condition and then adjust the feature status according to the results of gfxInfo and the pref. see UserForceEnable()
Reporter | ||
Comment 3•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/1-2/
Comment 4•8 years ago
|
||
https://reviewboard.mozilla.org/r/60112/#review57106 ::: gfx/thebes/gfxPlatform.cpp:2109 (Diff revision 2) > > - if (Preferences::GetBool("media.hardware-video-decoding.enabled", false) && > + FeatureState& hwVideoDecFeature = gfxConfig::GetFeature(Feature::HW_VIDEO_DECODING); > + > + // force enabled feature > + if (gfxPrefs::HardwareVideoDecodingForceEnabled()) { > + hwVideoDecFeature.UserForceEnable("User force-enabled video decoding."); Defaults need to be set first. Check the force enabled pref after setting the default.
Reporter | ||
Comment 5•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/2-3/
Comment 6•8 years ago
|
||
https://reviewboard.mozilla.org/r/60112/#review57292 ::: gfx/thebes/gfxPlatform.cpp (Diff revisions 2 - 3) > nsCString failureId; > if (!IsGfxInfoStatusOkay(nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING, &message, failureId)) { > hwVideoDecFeature.Disable(FeatureStatus::Blacklisted, message.get(), failureId); > } > > - Preferences::AddBoolVarCache(&sLayersHardwareVideoDecodingFailed, It looks like you should still be using this pref to adjust gfx::Feature::HW_VIDEO_DECODING ::: gfx/thebes/gfxPlatform.cpp:2172 (Diff revisions 2 - 3) > NS_LITERAL_CSTRING("FEATURE_FAILURE_COMP_SAFEMODE")); > } > } > > bool > gfxPlatform::CanUseHardwareVideoDecoding() This function needs to go away.
Reporter | ||
Comment 7•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/3-4/
Updated•8 years ago
|
Attachment #8764064 -
Flags: review?(jmuizelaar) → review-
Comment 8•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig https://reviewboard.mozilla.org/r/60112/#review57714 ::: gfx/thebes/gfxPlatform.h:179 (Diff revision 4) > > /** > + * Used to update (enable or disable) hw video decode feature based on pref > + * Dummy parameters are used to work with existing RegisterCallback func > + */ > + static void UpdateHWDecBasedOnPref(const char* aPref, void* aClosure); No need to have this as a class member. Just use a static function in gfxPlatform.cpp ::: gfx/thebes/gfxWindowsPlatform.cpp:405 (Diff revision 4) > UpdateANGLEConfig(); > UpdateRenderMode(); > } > > bool > gfxWindowsPlatform::CanUseHardwareVideoDecoding() These checks will need to be integrated into the HW_VIDEO_DECODING feature because this function is no longer being called. (I'm actually surprised that this compiled because as far as I can see CanUseHardwareVideoDecoding is marked override in gfxWindowsPlatform.h but no longer overrides anything after your patch)
Reporter | ||
Comment 9•8 years ago
|
||
https://reviewboard.mozilla.org/r/60112/#review57292 > It looks like you should still be using this pref to adjust gfx::Feature::HW_VIDEO_DECODING not the cleanest implementation, but the default RegisterCallback expects a void (*)(const char *, void *)'), so I threw in unused parameters into the callback function.
Reporter | ||
Comment 10•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/4-5/
Attachment #8764064 -
Flags: review- → review?(jmuizelaar)
Comment 11•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig https://reviewboard.mozilla.org/r/60112/#review57720 ::: gfx/thebes/gfxPlatform.cpp:2139 (Diff revisions 4 - 5) > // force enabled feature > if (gfxPrefs::HardwareVideoDecodingForceEnabled()) { > hwVideoDecFeature.UserForceEnable("User force-enabled video decoding."); > } > > +#ifdef XP_WIN This should probably go in gfxWindowPlatform instead.
Attachment #8764064 -
Flags: review?(jmuizelaar) → review-
Reporter | ||
Comment 12•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/5-6/
Attachment #8764064 -
Flags: review- → review?(jmuizelaar)
Reporter | ||
Comment 13•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/6-7/
Reporter | ||
Comment 14•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/7-8/
Reporter | ||
Comment 15•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/8-9/
Reporter | ||
Comment 16•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/9-10/
Reporter | ||
Comment 17•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/10-11/
Reporter | ||
Comment 18•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/11-12/
Reporter | ||
Comment 19•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/12-13/
Reporter | ||
Comment 20•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/13-14/
Reporter | ||
Comment 21•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/14-15/
Reporter | ||
Comment 22•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/15-16/
Reporter | ||
Comment 23•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/16-17/
Reporter | ||
Comment 24•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=23eb41b8995e
Reporter | ||
Comment 25•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/17-18/
Reporter | ||
Comment 26•8 years ago
|
||
re-tested GTest and passes https://treeherder.mozilla.org/#/jobs?repo=try&revision=e40b412b3cf4, should be ready to land now
Flags: needinfo?(jmuizelaar)
Comment 27•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig https://reviewboard.mozilla.org/r/60112/#review61122 ::: gfx/thebes/gfxPlatform.h:177 (Diff revision 18) > static void Shutdown(); > > static void InitLayersIPC(); > static void ShutdownLayersIPC(); > > + virtual void InitHWVideoDecoodingConfig(mozilla::gfx::FeatureState& hwVideoDecFeature){}; Decoding instead of Decooding ::: gfx/thebes/gfxPlatform.cpp:2140 (Diff revision 18) > - "media.hardware-video-decoding.failed", > - false); > + if (gfxPrefs::HardwareVideoDecodingForceEnabled()) { > + hwVideoDecFeature.UserForceEnable("User force-enabled video decoding."); > + } > + > +#ifdef XP_WIN > + gPlatform->InitHWVideoDecoodingConfig(hwVideoDecFeature); Let's just call this unconditionally. That makes things less surprising if anyone implements it on other platforms. ::: gfx/thebes/gfxWindowsPlatform.h:282 (Diff revision 18) > int8_t mUseClearTypeForDownloadableFonts; > int8_t mUseClearTypeAlways; > > private: > void Init(); > + You can drop this change.
Attachment #8764064 -
Flags: review?(jmuizelaar) → review+
Reporter | ||
Comment 28•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/18-19/
Reporter | ||
Comment 29•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/19-20/
Reporter | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 31•8 years ago
|
||
has problems to apply: Hunk #2 FAILED at 168 1 out of 3 hunks FAILED -- saving rejects to file gfx/thebes/gfxPlatform.h.rej patch failed to apply can you take a look, thanks!
Flags: needinfo?(eyim)
Keywords: checkin-needed
Reporter | ||
Comment 32•8 years ago
|
||
Comment on attachment 8764064 [details] Bug 1281259 - Port DXVA to gfxConfig Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60112/diff/20-21/
Comment 33•8 years ago
|
||
Pushed by acomminos@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c6d147ba37b5 Port DXVA to gfxConfig r=jrmuizel
I had to back this out in https://hg.mozilla.org/integration/autoland/rev/9c84392108d9 for apparently making Mn-e10s permafail on the Windows VM: https://treeherder.mozilla.org/logviewer.html#?job_id=798741&repo=autoland Looks like a known intermittent, but https://treeherder.mozilla.org/#/jobs?repo=autoland&fromchange=cc98fa9758625dad454895ee1206451464ca1a58&bugfiler&filter-searchStr=windows%20vm%20mn-e%20debug&selectedJob=798741&tochange=9c84392108d91ea0a598b13e0acfd6b086e2952a
Reporter | ||
Updated•8 years ago
|
Flags: needinfo?(eyim)
Reporter | ||
Comment 35•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ef597ed8c093
Reporter | ||
Comment 36•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=73894e8c0cc8
Reporter | ||
Comment 37•8 years ago
|
||
http://archive.mozilla.org/pub/firefox/try-builds/eyim@mozilla.com-1f04741a99d77ae3633b41c0fc3a8c97029e00ad/try-win32-debug/try_win7_vm-debug_test-marionette-e10s-bm139-tests1-windows-build172.txt.gz 10:28:59 INFO - TEST-START | test_refresh_firefox.py TestFirefoxRefresh.testReset 10:31:01 INFO - Failed to gather test failure debug. 10:31:01 INFO - Traceback (most recent call last): 10:31:01 INFO - File "c:\slave\test\build\venv\lib\site-packages\marionette\runner\base.py", line 550, in gather_debug 10:31:01 INFO - with marionette.using_context(marionette.CONTEXT_CHROME): 10:31:01 INFO - File "c:\mozilla-build\python27\Lib\contextlib.py", line 17, in __enter__ 10:31:01 INFO - return self.gen.next() 10:31:01 INFO - File "c:\slave\test\build\venv\lib\site-packages\marionette_driver\marionette.py", line 1319, in using_context 10:31:01 INFO - scope = self._send_message("getContext", key="value") 10:31:01 INFO - File "c:\slave\test\build\venv\lib\site-packages\marionette_driver\decorators.py", line 48, in _ 10:31:01 INFO - m.force_shutdown() 10:31:01 INFO - File "c:\slave\test\build\venv\lib\site-packages\marionette_driver\decorators.py", line 42, in _ 10:31:01 INFO - return func(*args, **kwargs) 10:31:01 INFO - File "c:\slave\test\build\venv\lib\site-packages\marionette_driver\marionette.py", line 682, in _send_message 10:31:01 INFO - msg = self.client.request(name, params) 10:31:01 INFO - File "c:\slave\test\build\venv\lib\site-packages\marionette_driver\transport.py", line 273, in request 10:31:01 INFO - self.send(cmd) 10:31:01 INFO - File "c:\slave\test\build\venv\lib\site-packages\marionette_driver\transport.py", line 247, in send 10:31:01 INFO - sent = self.sock.send(payload[totalsent:]) 10:31:01 INFO - File "c:\mozilla-build\python27\Lib\socket.py", line 170, in _dummy 10:31:01 INFO - raise error(EBADF, 'Bad file descriptor') 10:31:01 INFO - IOError: Process has been closed (Exit code: 0) (Reason: [Errno 9] Bad file descriptor) 10:31:01 ERROR - TEST-UNEXPECTED-ERROR | test_refresh_firefox.py TestFirefoxRefresh.testReset | IOError: Process has been closed (Exit code: 0) (Reason: Timed out waiting for port 2828!) Just to update, there is a timeout when running "test_refresh_firefox.py TestFirefoxRefresh.testReset" in marionette test suite. Not really sure what my patch has to do with this at all, especially only for windows 7 debug only. Seems like it may be some timing issue.
Updated•8 years ago
|
Flags: needinfo?(bgirard)
Comment hidden (mozreview-request) |
Comment 39•8 years ago
|
||
Rebased the patch. Found a typo that was causing an override to be missed. Let's push to try again to see if that was the issue.
Flags: needinfo?(jmuizelaar)
Updated•8 years ago
|
Assignee: ernest-yim → nobody
Flags: needinfo?(bgirard)
Updated•7 years ago
|
Priority: -- → P3
Whiteboard: [gfx-noted]
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•