RESOLVED FIXED 166675
Provide a setting for clients to always prefer low-power WebGL
https://bugs.webkit.org/show_bug.cgi?id=166675
Summary Provide a setting for clients to always prefer low-power WebGL
Tim Horton
Reported 2017-01-04 00:09:57 PST
Provide a setting for clients to always prefer low-power WebGL
Attachments
Patch (8.92 KB, patch)
2017-01-04 00:10 PST, Tim Horton
mitz: review+
Tim Horton
Comment 1 2017-01-04 00:10:22 PST
mitz
Comment 2 2017-01-04 00:39:56 PST
Comment on attachment 297996 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=297996&action=review > Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:403 > + if (frame->settings().preferLowPowerWebGLRendering()) > + attributes.preferLowPowerToHighPerformance = true; Should this check the current value of preferLowPowerToHighPerformance before consulting Settings, like we do with the antialias attribute above?
Tim Horton
Comment 3 2017-01-04 00:43:46 PST
Comment on attachment 297996 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=297996&action=review >> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:403 >> + attributes.preferLowPowerToHighPerformance = true; > > Should this check the current value of preferLowPowerToHighPerformance before consulting Settings, like we do with the antialias attribute above? I guess it could? Just to save the cost of asking Settings?
Tim Horton
Comment 4 2017-01-04 00:56:46 PST
Tim Horton
Comment 5 2017-01-04 00:57:06 PST
Myles C. Maxfield
Comment 6 2017-01-04 10:46:39 PST
Comment on attachment 297996 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=297996&action=review >>> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:403 >>> + attributes.preferLowPowerToHighPerformance = true; >> >> Should this check the current value of preferLowPowerToHighPerformance before consulting Settings, like we do with the antialias attribute above? > > I guess it could? Just to save the cost of asking Settings? Why do you call the internal setting "prefer?" The implementation seems a lot like "force" or "supports" to me.
Tim Horton
Comment 7 2017-01-04 11:02:38 PST
(In reply to comment #6) > Comment on attachment 297996 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=297996&action=review > > >>> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:403 > >>> + attributes.preferLowPowerToHighPerformance = true; > >> > >> Should this check the current value of preferLowPowerToHighPerformance before consulting Settings, like we do with the antialias attribute above? > > > > I guess it could? Just to save the cost of asking Settings? > > Why do you call the internal setting "prefer?" The implementation seems a > lot like "force" or "supports" to me. Because the whole thing is a "prefer" (if the discrete card is up, we'll still use that). It might be "force prefer", but it's definitely not just "force-use low power".
Note You need to log in before you can comment on or make changes to this bug.