Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Issue 2037793002: Move GLContext creation from //ui/gl to //ui/gl/init. (Closed)

Created:
4 years, 6 months ago by kylechar
Modified:
4 years, 6 months ago
Reviewers:
piman
CC:
chromium-reviews, kalyank, ozone-reviews_chromium.org, halliwell
Base URL:
https://chromium.googlesource.com/chromium/src.git@gl_init
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move GLContext creation from //ui/gl to //ui/gl/init. Move the code that performs GLContext creation to the new target. Remove the old code and delete the static method from GLContext entirely. This adds gl_factory_<platform>.cc files for all platforms. These platform specific files will have GLSurface creation code added next. Add InitializeGLContext() function to simplify a common pattern that is repeated frequently. When a new GLContext is created, it's wrapped in a scoped_refptr and then initialized. If initialization fails nullptr is returned instead. Encapsulate this logic into a function instead of repeating it. There is one code change in GLSurfaceEGL::InitalizeOneOff(). It creates a GLContext to test if surfaceless contexts are supported. It can no longer use the deleted method in GLContext. All platforms that hit this code path will end up creating a GLContextEGL, so just directly instantiate it. This change is part of step two from the associated bug. BUG=611142 Committed: https://crrev.com/872f45f441e8f7ec36b6947d32622918ffe15fae Cr-Commit-Position: refs/heads/master@{#398350}

Patch Set 1 #

Patch Set 2 : Fix GYP. #

Patch Set 3 : Add missing exports. #

Total comments: 2

Patch Set 4 : Change to scoped_refptr. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+218 lines, -400 lines) Patch
M ui/gl/BUILD.gn View 3 chunks +0 lines, -5 lines 0 comments Download
M ui/gl/gl.gyp View 1 1 chunk +0 lines, -5 lines 0 comments Download
M ui/gl/gl_context.h View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M ui/gl/gl_context.cc View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
D ui/gl/gl_context_android.cc View 1 chunk +0 lines, -99 lines 0 comments Download
M ui/gl/gl_context_cgl.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M ui/gl/gl_context_egl.h View 2 chunks +2 lines, -1 line 0 comments Download
D ui/gl/gl_context_mac.mm View 1 chunk +0 lines, -55 lines 0 comments Download
D ui/gl/gl_context_ozone.cc View 1 chunk +0 lines, -46 lines 0 comments Download
M ui/gl/gl_context_wgl.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
D ui/gl/gl_context_win.cc View 1 chunk +0 lines, -59 lines 0 comments Download
D ui/gl/gl_context_x11.cc View 1 chunk +0 lines, -61 lines 0 comments Download
M ui/gl/gl_surface_egl.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M ui/gl/init/BUILD.gn View 1 1 chunk +20 lines, -5 lines 0 comments Download
M ui/gl/init/gl_factory.cc View 1 1 chunk +0 lines, -7 lines 0 comments Download
A + ui/gl/init/gl_factory_android.cc View 1 4 chunks +24 lines, -27 lines 0 comments Download
A + ui/gl/init/gl_factory_mac.cc View 1 2 chunks +16 lines, -26 lines 0 comments Download
A ui/gl/init/gl_factory_ozone.cc View 1 1 chunk +41 lines, -0 lines 0 comments Download
A ui/gl/init/gl_factory_win.cc View 1 1 chunk +44 lines, -0 lines 0 comments Download
A ui/gl/init/gl_factory_x11.cc View 1 1 chunk +43 lines, -0 lines 0 comments Download
M ui/gl/init/gl_init.gyp View 1 1 chunk +5 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 25 (12 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037793002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2037793002/1
4 years, 6 months ago (2016-06-02 19:59:25 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/180065)
4 years, 6 months ago (2016-06-02 20:17:07 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037793002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2037793002/20001
4 years, 6 months ago (2016-06-03 14:15:46 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/213769)
4 years, 6 months ago (2016-06-03 14:50:59 UTC) #9
kylechar
4 years, 6 months ago (2016-06-03 16:34:58 UTC) #12
piman
lgtm https://codereview.chromium.org/2037793002/diff/40001/ui/gl/gl_context.h File ui/gl/gl_context.h (right): https://codereview.chromium.org/2037793002/diff/40001/ui/gl/gl_context.h#newcode205 ui/gl/gl_context.h:205: GLContext* raw_context, nit: since your're taking (and returning) ...
4 years, 6 months ago (2016-06-03 20:37:25 UTC) #13
kylechar
https://codereview.chromium.org/2037793002/diff/40001/ui/gl/gl_context.h File ui/gl/gl_context.h (right): https://codereview.chromium.org/2037793002/diff/40001/ui/gl/gl_context.h#newcode205 ui/gl/gl_context.h:205: GLContext* raw_context, On 2016/06/03 20:37:25, piman OOO back 2016-6-9 ...
4 years, 6 months ago (2016-06-07 14:43:43 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037793002/60001
4 years, 6 months ago (2016-06-07 14:44:05 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/234633)
4 years, 6 months ago (2016-06-07 17:01:26 UTC) #19
kylechar
On 2016/06/07 17:01:26, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 6 months ago (2016-06-07 17:25:32 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2037793002/60001
4 years, 6 months ago (2016-06-07 17:26:09 UTC) #22
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 6 months ago (2016-06-07 18:27:54 UTC) #23
commit-bot: I haz the power
4 years, 6 months ago (2016-06-07 18:29:56 UTC) #25
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/872f45f441e8f7ec36b6947d32622918ffe15fae
Cr-Commit-Position: refs/heads/master@{#398350}

Powered by Google App Engine
This is Rietveld 408576698