RESOLVED FIXED237460
[WinCairo] GraphicsContextGL should have one more output texture for double buffering WebGL
https://bugs.webkit.org/show_bug.cgi?id=237460
Summary [WinCairo] GraphicsContextGL should have one more output texture for double b...
Fujii Hironori
Reported 2022-03-03 20:09:13 PST
[WinCairo] GraphicsContextGL should have one more output texture for double buffering WebGL WinCairo's GraphicsContextGL has only a single output texture now. The WebGL output can get broken if the page is interactive. For example, Google Maps is using WebGL for the map. If a user is drugging the map, the map becomes blank. https://www.google.com/maps
Attachments
Patch (9.68 KB, patch)
2022-03-03 20:19 PST, Fujii Hironori
no flags
Patch (8.16 KB, patch)
2022-03-07 13:07 PST, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2022-03-03 20:19:41 PST
Kimmo Kinnunen
Comment 2 2022-03-04 02:41:33 PST
Comment on attachment 453808 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453808&action=review > Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:393 > +#define BACKING(backing) backing FWIW, to me it would appear that the USE(COORDINATED_GRAPHICS) and !USE(COORDINATED_GRAPHICS) do not share that much in common. Maybe it would make senes to just have two different functions or at least two different function contents, and just write the code linearly. The BACKING macro and invoking it with sometimes undefined variable name looks very confusing.
Fujii Hironori
Comment 3 2022-03-06 12:43:58 PST
Comment on attachment 453808 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453808&action=review >> Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:393 >> +#define BACKING(backing) backing > > FWIW, to me it would appear that the USE(COORDINATED_GRAPHICS) and !USE(COORDINATED_GRAPHICS) do not share that much in common. > Maybe it would make senes to just have two different functions or at least two different function contents, and just write the code linearly. > The BACKING macro and invoking it with sometimes undefined variable name looks very confusing. Thank you for the comment. But, I don't think they are doing different things. !USE(COORDINATED_GRAPHICS) resizes two textures while USE(COORDINATED_GRAPHICS) resizes three textures or sets backings. And, they are sharing other code, for example initializing and finalizing m_compositorTexture.
Zan Dobersek
Comment 4 2022-03-07 06:12:58 PST
Comment on attachment 453808 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453808&action=review > Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:554 > -#if USE(COORDINATED_GRAPHICS) > +#if !PLATFORM(COCOA) What if you use `USE(TEXTURE_MAPPER) || USE(COORDINATED_GRAPHICS)` along with guarding the extra swaps, like you've done below? >>> Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:393 >>> +#define BACKING(backing) backing >> >> FWIW, to me it would appear that the USE(COORDINATED_GRAPHICS) and !USE(COORDINATED_GRAPHICS) do not share that much in common. >> Maybe it would make senes to just have two different functions or at least two different function contents, and just write the code linearly. >> The BACKING macro and invoking it with sometimes undefined variable name looks very confusing. > > Thank you for the comment. > But, I don't think they are doing different things. > !USE(COORDINATED_GRAPHICS) resizes two textures while USE(COORDINATED_GRAPHICS) resizes three textures or sets backings. > And, they are sharing other code, for example initializing and finalizing m_compositorTexture. It's hard to grasp what's going on here, and it's going to change soon for USE(COORDINATED_GRAPHICS) anyway. Better duplicate the code for now in something like the following block: ``` #if USE(COORDINATED_GRAPHICS) ... #elif USE(TEXTURE_MAPPER) ... #endif ```
Fujii Hironori
Comment 5 2022-03-07 12:56:06 PST
Comment on attachment 453808 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453808&action=review >> Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:554 >> +#if !PLATFORM(COCOA) > > What if you use `USE(TEXTURE_MAPPER) || USE(COORDINATED_GRAPHICS)` along with guarding the extra swaps, like you've done below? Got it. I will revise. But, if I change here, I have to change the macro for m_compositorTexture definition in GraphicsContextGLANGLE.h for the consistency. >>>> Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:393 >>>> +#define BACKING(backing) backing >>> >>> FWIW, to me it would appear that the USE(COORDINATED_GRAPHICS) and !USE(COORDINATED_GRAPHICS) do not share that much in common. >>> Maybe it would make senes to just have two different functions or at least two different function contents, and just write the code linearly. >>> The BACKING macro and invoking it with sometimes undefined variable name looks very confusing. >> >> Thank you for the comment. >> But, I don't think they are doing different things. >> !USE(COORDINATED_GRAPHICS) resizes two textures while USE(COORDINATED_GRAPHICS) resizes three textures or sets backings. >> And, they are sharing other code, for example initializing and finalizing m_compositorTexture. > > It's hard to grasp what's going on here, and it's going to change soon for USE(COORDINATED_GRAPHICS) anyway. > > Better duplicate the code for now in something like the following block: > ``` > #if USE(COORDINATED_GRAPHICS) > ... > #elif USE(TEXTURE_MAPPER) > ... > #endif > ``` Got it. I will revise with duplicating approach. But, I thiknk USE(TEXTURE_MAPPER)) isn't needed here.
Fujii Hironori
Comment 6 2022-03-07 13:07:21 PST
Zan Dobersek (Reviews)
Comment 7 2022-03-07 23:30:32 PST
Comment on attachment 454020 [details] Patch Awesome, thanks.
Fujii Hironori
Comment 8 2022-03-07 23:32:12 PST
Comment on attachment 454020 [details] Patch Thank you for the review.
EWS
Comment 9 2022-03-08 00:56:58 PST
Committed r290980 (248158@main): <https://commits.webkit.org/248158@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 454020 [details].
Radar WebKit Bug Importer
Comment 10 2022-03-08 00:57:18 PST
Note You need to log in before you can comment on or make changes to this bug.