Bug 195167

Summary: [CoordinatedGraphics] Unify DrawingArea classes
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: don.olmstead, ews-watchlist, Hironori.Fujii, webkit-bug-importer, zan
Priority: P2 Keywords: Gtk, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 195159    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
ews-watchlist: commit-queue-
Archive of layout-test-results from ews112 for mac-highsierra
none
Patch
none
Patch zan: review+

Carlos Garcia Campos
Reported 2019-02-28 08:44:17 PST
In both UI and Web processes.
Attachments
Patch (140.38 KB, patch)
2019-02-28 08:46 PST, Carlos Garcia Campos
no flags
Patch (142.27 KB, patch)
2019-02-28 11:33 PST, Don Olmstead
no flags
Patch (141.91 KB, patch)
2019-02-28 12:35 PST, Don Olmstead
no flags
Patch (141.90 KB, patch)
2019-02-28 12:43 PST, Don Olmstead
no flags
Patch (141.92 KB, patch)
2019-02-28 12:58 PST, Don Olmstead
no flags
Patch (142.25 KB, patch)
2019-02-28 13:22 PST, Don Olmstead
ews-watchlist: commit-queue-
Archive of layout-test-results from ews112 for mac-highsierra (1.96 MB, application/zip)
2019-03-01 01:54 PST, EWS Watchlist
no flags
Patch (141.10 KB, patch)
2019-03-01 04:12 PST, Carlos Garcia Campos
no flags
Patch (140.79 KB, patch)
2019-03-01 06:44 PST, Carlos Garcia Campos
zan: review+
Carlos Garcia Campos
Comment 1 2019-02-28 08:46:01 PST
Carlos Garcia Campos
Comment 2 2019-02-28 08:47:33 PST
It doesn't apply because it depends on bug #195159
Don Olmstead
Comment 3 2019-02-28 09:00:52 PST Comment hidden (obsolete)
Don Olmstead
Comment 4 2019-02-28 11:33:37 PST Comment hidden (obsolete)
EWS Watchlist
Comment 5 2019-02-28 11:36:10 PST Comment hidden (obsolete)
Don Olmstead
Comment 6 2019-02-28 11:40:25 PST
Comment on attachment 363243 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363243&action=review This is building locally. I'll see what the bots have to say about it. One nit on this patch is that there's ports not turning on CoordinatedGraphics are taking in code that's marked as CoordinatedGraphics. Its a bit weird seeing USE(COORDINATED_GRAPHICS) inside there. Maybe a better name is required. Also as a followup it might be nice to have a platform specific cmake or SourcesCoordinatedGraphics.txt to keep the ports in sync with builds. > Source/WebKit/PlatformWin.cmake:-83 > - WebProcess/WebPage/DrawingAreaImpl.cpp This was still there in the original patch so CMake failed to create the project. > Source/WebKit/WebProcess/WebPage/DrawingArea.h:147 > -#if USE(COORDINATED_GRAPHICS) > - virtual void didChangeViewportAttributes(WebCore::ViewportAttributes&&) = 0; > -#endif > - > #if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER) > + virtual void didChangeViewportAttributes(WebCore::ViewportAttributes&&) = 0; > virtual void deviceOrPageScaleFactorChanged() = 0; > #endif I moved didChangeViewportAttributes because its in DrawingAreaCoordinatedGraphics and WinCairo errored since it was marked as override. It looks like these two methods could probably just be moved completely to DrawingAreaCoordinatedGraphics but I did not do so since I'm just making this patch compile.
Don Olmstead
Comment 7 2019-02-28 11:50:49 PST
wtf/glib/RunLoopSourcePriority in the #PLATFORM(WPE) portion does not have NonAcceleratedDrawingTimer defined so that's failing. Not sure what that number should be for that platform but that'll need to be in this patch.
Don Olmstead
Comment 8 2019-02-28 12:35:40 PST Comment hidden (obsolete)
Don Olmstead
Comment 9 2019-02-28 12:43:38 PST Comment hidden (obsolete)
Don Olmstead
Comment 10 2019-02-28 12:58:06 PST Comment hidden (obsolete)
Don Olmstead
Comment 11 2019-02-28 13:22:01 PST
Don Olmstead
Comment 12 2019-02-28 14:46:46 PST
Ok everything is building now! I would probably still double check that Gentoo works with GTK since it doesn't have GL, but everything else should be reviewable. I asked aperezdc about the value for WPE and he said it shouldn't matter since you can't run WPE without AC. Feel free to change accordingly if that assumption is correct.
Fujii Hironori
Comment 13 2019-02-28 19:06:47 PST
(In reply to Don Olmstead from comment #6) > Maybe a better name is required. Year. I always think so. USE(COORDINATED_GRAPHICS) was originally named USE(UI_SIDE_COMPOSITING). Then, renamed USE(COORDINATED_GRAPHICS_MULTIPROCESS). Then, it's been removed with Qt port and EFL port removal. 'Coordinated' originally meant being cooperative between two processes.
Carlos Garcia Campos
Comment 14 2019-02-28 22:41:37 PST
(In reply to Don Olmstead from comment #6) > Comment on attachment 363243 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=363243&action=review > > This is building locally. I'll see what the bots have to say about it. > > > One nit on this patch is that there's ports not turning on > CoordinatedGraphics are taking in code that's marked as CoordinatedGraphics. > Its a bit weird seeing USE(COORDINATED_GRAPHICS) inside there. Maybe a > better name is required. That's only the case of WinCairo, right? and the plan is to switch to coordinated graphics eventually, right? Fujii proposed to rename it once WinCairo switches, but I thought we could just name it coordinated graphics directly, even if the current situation is a bit weird for WinCairo. In any case, I don't mind to use a better name, any proposal? > Also as a followup it might be nice to have a platform specific cmake or > SourcesCoordinatedGraphics.txt to keep the ports in sync with builds. > > > Source/WebKit/PlatformWin.cmake:-83 > > - WebProcess/WebPage/DrawingAreaImpl.cpp > > This was still there in the original patch so CMake failed to create the > project. Forgot to remove that one, thanks! > > Source/WebKit/WebProcess/WebPage/DrawingArea.h:147 > > -#if USE(COORDINATED_GRAPHICS) > > - virtual void didChangeViewportAttributes(WebCore::ViewportAttributes&&) = 0; > > -#endif > > - > > #if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER) > > + virtual void didChangeViewportAttributes(WebCore::ViewportAttributes&&) = 0; > > virtual void deviceOrPageScaleFactorChanged() = 0; > > #endif > > I moved didChangeViewportAttributes because its in > DrawingAreaCoordinatedGraphics and WinCairo errored since it was marked as > override. > > It looks like these two methods could probably just be moved completely to > DrawingAreaCoordinatedGraphics but I did not do so since I'm just making > this patch compile. I see.
Carlos Garcia Campos
Comment 15 2019-02-28 22:44:28 PST
(In reply to Don Olmstead from comment #12) > Ok everything is building now! I would probably still double check that > Gentoo works with GTK since it doesn't have GL, but everything else should > be reviewable. I'll run a GTK build with OpenGL disabled to make sure it still builds. > I asked aperezdc about the value for WPE and he said it shouldn't matter > since you can't run WPE without AC. Feel free to change accordingly if that > assumption is correct. Right, I'm not sure if we should #ifdef the non-ac mode in WPE to make it explicit.
Carlos Garcia Campos
Comment 16 2019-02-28 22:47:49 PST
(In reply to Fujii Hironori from comment #13) > (In reply to Don Olmstead from comment #6) > > Maybe a better name is required. > > Year. I always think so. > USE(COORDINATED_GRAPHICS) was originally named USE(UI_SIDE_COMPOSITING). > Then, renamed USE(COORDINATED_GRAPHICS_MULTIPROCESS). > Then, it's been removed with Qt port and EFL port removal. > 'Coordinated' originally meant being cooperative between two processes. I agree, but that affects all current code under USE(COORDINATED_GRAPHICS), right? In this case, there's nothing specific to coordinated graphics in the DrawingArea implementation, it actually means the drawing area implementation of coordinated graphics based ports (even if it's not true for WinCairo yet). I'm open to use a better name, but Impl definitely isn't :-)
EWS Watchlist
Comment 17 2019-03-01 01:54:16 PST
Comment on attachment 363257 [details] Patch Attachment 363257 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11327915 New failing tests: storage/indexeddb/modern/blocked-open-db-requests-private.html
EWS Watchlist
Comment 18 2019-03-01 01:54:18 PST
Created attachment 363315 [details] Archive of layout-test-results from ews112 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-highsierra Platform: Mac OS X 10.13.6
Carlos Garcia Campos
Comment 19 2019-03-01 04:12:38 PST
Fujii Hironori
Comment 20 2019-03-01 05:48:06 PST
Comment on attachment 363323 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363323&action=review > Source/WebKit/PlatformWin.cmake:117 > + "${WEBKIT_DIR}/UIProcess/CoordinatedGraphics" I hope WinCairo port will switch to CoordinatedGraphics to reduce the maintenance cost. However, I'm not satisfied with the current CoordinatedGraphics quality, for example in <https://webkit.org/blog-files/3d-transforms/morphing-cubes.html>. If this directory is add to the include path, WinCairo port can't have other LayerTreeHost.h to have different implementations temporarily until CoordinatedGraphics issue will be addressed. FWIW, I heard AppleWin port will switch to WK2. In that case, it will happen to resurrect DrawingAreaImpl again.
Carlos Garcia Campos
Comment 21 2019-03-01 06:44:21 PST
Carlos Garcia Campos
Comment 22 2019-03-01 06:45:46 PST
(In reply to Fujii Hironori from comment #20) > Comment on attachment 363323 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=363323&action=review > > > Source/WebKit/PlatformWin.cmake:117 > > + "${WEBKIT_DIR}/UIProcess/CoordinatedGraphics" > > I hope WinCairo port will switch to CoordinatedGraphics to reduce the > maintenance cost. > However, I'm not satisfied with the current CoordinatedGraphics quality, for > example in <https://webkit.org/blog-files/3d-transforms/morphing-cubes.html>. What's wrong there? > If this directory is add to the include path, WinCairo port can't have other > LayerTreeHost.h to have different implementations temporarily until > CoordinatedGraphics issue will be addressed. I see, let's find a better name for the common DrawingArea then. > FWIW, I heard AppleWin port will switch to WK2. In that case, it will happen > to resurrect DrawingAreaImpl again.
Zan Dobersek
Comment 23 2019-03-01 08:12:07 PST
Comment on attachment 363326 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363326&action=review > Source/WebKit/PlatformWin.cmake:81 > WebProcess/WebPage/AcceleratedSurface.cpp Can we also pull AcceleratedSurface files under WebProcess/WebPage/CoordinatedGraphics/?
Carlos Garcia Campos
Comment 24 2019-03-01 09:10:03 PST
(In reply to Zan Dobersek from comment #23) > Comment on attachment 363326 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=363326&action=review > > > Source/WebKit/PlatformWin.cmake:81 > > WebProcess/WebPage/AcceleratedSurface.cpp > > Can we also pull AcceleratedSurface files under > WebProcess/WebPage/CoordinatedGraphics/? Indeed, and move what we have in Shared to WebProcess too.
Fujii Hironori
Comment 25 2019-03-03 19:32:35 PST
(In reply to Carlos Garcia Campos from comment #24) > Indeed, and move what we have in Shared to WebProcess too. How about the idea moving them into WebCore/platform/graphics/texmap/coordinated? They don't have WK2 dependency. We wouldn't need to check two directories.
Fujii Hironori
Comment 26 2019-03-03 20:32:25 PST
(In reply to Carlos Garcia Campos from comment #22) > What's wrong there? Last week, I observed two issues in Morphing Power Cubes in both GTK port and WinCairo port with WIP patch (Bug 186364). One is sometimes the animation doesn'start (Bug 186364 Comment 8), another is "Toggle Shape" animation doesn't animate smoothly. However, I don't see both issues today. It seems your change of Bug 195208 addressed them.
Carlos Garcia Campos
Comment 27 2019-03-04 01:39:11 PST
(In reply to Fujii Hironori from comment #25) > (In reply to Carlos Garcia Campos from comment #24) > > Indeed, and move what we have in Shared to WebProcess too. > > How about the idea moving them into > WebCore/platform/graphics/texmap/coordinated? > They don't have WK2 dependency. We wouldn't need to check two directories. There's no dependency but it's only used by WebKit2, and only expected to be used by the WebProcess.
Carlos Garcia Campos
Comment 28 2019-03-04 01:58:15 PST
Radar WebKit Bug Importer
Comment 29 2019-03-04 01:59:34 PST
Note You need to log in before you can comment on or make changes to this bug.