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

Issue 1135743004: cc: Add null checks for GrContext created by ContextProviderCommandBuffer. (Closed)

Created:
5 years, 7 months ago by vmiura
Modified:
5 years, 7 months ago
CC:
chromium-reviews, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, cc-bugs_chromium.org, danakj+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Add null checks for GrContext created by ContextProviderCommandBuffer. GrContext::Create may return NULL if the base GL context was lost. - Check for the NULL case in GlRenderer. - For the GPU rasterizer, don't allow GPU rasterization to be initialized with a NULL GrContext. BUG=464892 Committed: https://crrev.com/4e7e199cb73c95ee81c0804cf14a3d6ab015c75c Cr-Commit-Position: refs/heads/master@{#330104}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Create and check GrContext early in LTHI::InitializeRenderer() #

Total comments: 7

Patch Set 3 : Block GPU rasterization mode if ContextProviders or GrContext are missing. #

Patch Set 4 : Only check the GrContext when GPU raster is transitioning to On. #

Patch Set 5 : worker_context_provider has a lock that must be held while GrContext initializes. #

Patch Set 6 : Worker context provider's lock must be held during GrContext creation. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -7 lines) Patch
M cc/output/gl_renderer.cc View 1 2 3 4 1 chunk +7 lines, -1 line 0 comments Download
M cc/test/fake_output_surface.h View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 2 chunks +25 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 49 (12 generated)
vmiura
PTAL. Dana, do we have a GLRenderer ApplyImageFilter test where I could add a context ...
5 years, 7 months ago (2015-05-12 20:35:24 UTC) #2
vmiura
sievers@chromium.org: Please review changes in content/common/gpu/client/context_provider_command_buffer.cc
5 years, 7 months ago (2015-05-12 21:13:53 UTC) #4
bsalomon
On 2015/05/12 20:35:24, vmiura wrote: > PTAL. > > Dana, do we have a GLRenderer ...
5 years, 7 months ago (2015-05-12 21:18:37 UTC) #5
danakj
So may if statements everywhere, this is making me sad. We're sure to miss places ...
5 years, 7 months ago (2015-05-12 21:19:13 UTC) #6
vmiura
On 2015/05/12 21:19:13, danakj wrote: > So may if statements everywhere, this is making me ...
5 years, 7 months ago (2015-05-12 21:57:56 UTC) #7
danakj
Can we do that? On Tue, May 12, 2015 at 2:57 PM, <vmiura@chromium.org> wrote: > ...
5 years, 7 months ago (2015-05-12 22:00:22 UTC) #8
piman
https://codereview.chromium.org/1135743004/diff/1/content/common/gpu/client/context_provider_command_buffer.cc File content/common/gpu/client/context_provider_command_buffer.cc (right): https://codereview.chromium.org/1135743004/diff/1/content/common/gpu/client/context_provider_command_buffer.cc#newcode143 content/common/gpu/client/context_provider_command_buffer.cc:143: // GrContext creation should not fail with a valid ...
5 years, 7 months ago (2015-05-12 22:06:11 UTC) #10
vmiura
GrContext can work as a usable C++ object after it's created, and it's able to ...
5 years, 7 months ago (2015-05-12 23:09:40 UTC) #11
piman
LGTM + nits https://codereview.chromium.org/1135743004/diff/20001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/1135743004/diff/20001/cc/trees/layer_tree_host_impl.cc#newcode2173 cc/trees/layer_tree_host_impl.cc:2173: if (!context_provider) nit: you can probably ...
5 years, 7 months ago (2015-05-12 23:33:51 UTC) #12
danakj
https://codereview.chromium.org/1135743004/diff/20001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1135743004/diff/20001/cc/output/gl_renderer.cc#newcode166 cc/output/gl_renderer.cc:166: // GrContext for filters is created lazily, and may ...
5 years, 7 months ago (2015-05-12 23:40:43 UTC) #13
danakj
+senorblanco
5 years, 7 months ago (2015-05-12 23:40:59 UTC) #15
vmiura
https://codereview.chromium.org/1135743004/diff/20001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/1135743004/diff/20001/cc/trees/layer_tree_host_impl.cc#newcode2169 cc/trees/layer_tree_host_impl.cc:2169: if (use_gpu_rasterization_) { On 2015/05/12 23:40:43, danakj wrote: > ...
5 years, 7 months ago (2015-05-13 02:53:00 UTC) #16
piman
https://codereview.chromium.org/1135743004/diff/20001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/1135743004/diff/20001/cc/trees/layer_tree_host_impl.cc#newcode2169 cc/trees/layer_tree_host_impl.cc:2169: if (use_gpu_rasterization_) { On 2015/05/13 02:53:00, vmiura wrote: > ...
5 years, 7 months ago (2015-05-13 03:28:36 UTC) #17
Stephen White
https://codereview.chromium.org/1135743004/diff/20001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/1135743004/diff/20001/cc/trees/layer_tree_host_impl.cc#newcode2169 cc/trees/layer_tree_host_impl.cc:2169: if (use_gpu_rasterization_) { On 2015/05/13 03:28:36, piman (Very slow ...
5 years, 7 months ago (2015-05-13 10:10:14 UTC) #18
danakj
On Tue, May 12, 2015 at 8:28 PM, <piman@chromium.org> wrote: > > > https://codereview.chromium.org/1135743004/diff/20001/cc/trees/layer_tree_host_impl.cc > ...
5 years, 7 months ago (2015-05-13 16:53:17 UTC) #19
vmiura
On 2015/05/13 16:53:17, danakj wrote: > On Tue, May 12, 2015 at 8:28 PM, <mailto:piman@chromium.org> ...
5 years, 7 months ago (2015-05-13 17:19:30 UTC) #20
Stephen White
On 2015/05/13 17:19:30, vmiura wrote: > On 2015/05/13 16:53:17, danakj wrote: > > On Tue, ...
5 years, 7 months ago (2015-05-13 17:44:24 UTC) #21
vmiura
On 2015/05/13 17:44:24, Stephen White wrote: > On 2015/05/13 17:19:30, vmiura wrote: > > On ...
5 years, 7 months ago (2015-05-13 17:57:34 UTC) #22
danakj
On Wed, May 13, 2015 at 10:57 AM, <vmiura@chromium.org> wrote: > On 2015/05/13 17:44:24, Stephen ...
5 years, 7 months ago (2015-05-13 18:05:26 UTC) #23
Stephen White
On 2015/05/13 18:05:26, danakj wrote: > On Wed, May 13, 2015 at 10:57 AM, <mailto:vmiura@chromium.org> ...
5 years, 7 months ago (2015-05-13 18:21:06 UTC) #24
danakj
On Wed, May 13, 2015 at 11:21 AM, <senorblanco@chromium.org> wrote: > On 2015/05/13 18:05:26, danakj ...
5 years, 7 months ago (2015-05-13 18:22:47 UTC) #25
danakj
On Wed, May 13, 2015 at 11:22 AM, Dana Jansens <danakj@chromium.org> wrote: > On Wed, ...
5 years, 7 months ago (2015-05-13 18:23:43 UTC) #26
Stephen White
On 2015/05/13 18:23:43, danakj wrote: > > I would much prefer that we maintain the ...
5 years, 7 months ago (2015-05-13 19:19:01 UTC) #27
Stephen White
On 2015/05/13 19:19:01, Stephen White wrote: > On 2015/05/13 18:23:43, danakj wrote: > > > ...
5 years, 7 months ago (2015-05-13 19:38:03 UTC) #28
vmiura
On 2015/05/13 18:05:26, danakj wrote: > On Wed, May 13, 2015 at 10:57 AM, <mailto:vmiura@chromium.org> ...
5 years, 7 months ago (2015-05-13 20:36:08 UTC) #29
danakj
On Wed, May 13, 2015 at 1:36 PM, <vmiura@chromium.org> wrote: > On 2015/05/13 18:05:26, danakj ...
5 years, 7 months ago (2015-05-13 20:44:40 UTC) #30
vmiura
PT Another Look. I've merged https://codereview.chromium.org/1139463004 here, so instead of bailing in InitializeRenderer(), we block ...
5 years, 7 months ago (2015-05-13 23:26:13 UTC) #31
piman
lgtm
5 years, 7 months ago (2015-05-13 23:28:06 UTC) #32
danakj
LGTM
5 years, 7 months ago (2015-05-13 23:46:29 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1135743004/40001
5 years, 7 months ago (2015-05-14 00:09:10 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/64642)
5 years, 7 months ago (2015-05-14 02:24:48 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1135743004/60001
5 years, 7 months ago (2015-05-14 20:02:41 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/64971)
5 years, 7 months ago (2015-05-14 22:11:31 UTC) #43
vmiura
I missed that we must hold the worker context's lock while GrContext() is touched and ...
5 years, 7 months ago (2015-05-15 01:15:42 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1135743004/100001
5 years, 7 months ago (2015-05-15 16:09:35 UTC) #47
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 7 months ago (2015-05-15 16:16:36 UTC) #48
commit-bot: I haz the power
5 years, 7 months ago (2015-05-15 16:17:27 UTC) #49
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/4e7e199cb73c95ee81c0804cf14a3d6ab015c75c
Cr-Commit-Position: refs/heads/master@{#330104}

Powered by Google App Engine
This is Rietveld 408576698