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

Issue 988953002: gpu-raster: Check for NULL sk_surface in GpuRasterizer::RasterizeSource. (Closed)

Created:
5 years, 9 months ago by vmiura
Modified:
5 years, 9 months ago
CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org, jam, mlamouri+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

gpu-raster: Check for NULL sk_surface in GpuRasterizer::RasterizeSource. When the GL Context has been lost, GrContext::wrapBackendTexture returns NULL and ScopedWriteLockGr::InitSkSurface fails to initialize the SkSurface. In this case, skip trying to draw to the SkSurface's canvas. BUG=464933 Committed: https://crrev.com/4cf8d357f19f4f5c4a8628ef43d352f8e003226a Cr-Commit-Position: refs/heads/master@{#320153}

Patch Set 1 : #

Total comments: 2

Patch Set 2 : Added comments for lost context case. #

Patch Set 3 : Added unit test. #

Total comments: 6

Patch Set 4 : Fix suggestions. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -2 lines) Patch
M cc/resources/gpu_rasterizer.cc View 1 2 chunks +12 lines, -2 lines 0 comments Download
M cc/resources/tile_task_worker_pool_unittest.cc View 1 2 3 chunks +24 lines, -0 lines 0 comments Download
M cc/test/test_context_provider.cc View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.cc View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (9 generated)
vmiura
PTAL
5 years, 9 months ago (2015-03-07 00:33:04 UTC) #2
danakj
What can make it be null? Do we want to just show white/black but pretend ...
5 years, 9 months ago (2015-03-07 00:35:50 UTC) #5
vmiura
On 2015/03/07 00:35:50, danakj wrote: > What can make it be null? Do we want ...
5 years, 9 months ago (2015-03-07 00:39:14 UTC) #7
vmiura
On 2015/03/07 00:39:14, vmiura wrote: > On 2015/03/07 00:35:50, danakj wrote: > > What can ...
5 years, 9 months ago (2015-03-07 04:05:30 UTC) #8
hendrikw
On 2015/03/07 04:05:30, vmiura wrote: > On 2015/03/07 00:39:14, vmiura wrote: > > On 2015/03/07 ...
5 years, 9 months ago (2015-03-09 15:53:27 UTC) #9
danakj
https://codereview.chromium.org/988953002/diff/40001/cc/resources/gpu_rasterizer.cc File cc/resources/gpu_rasterizer.cc (right): https://codereview.chromium.org/988953002/diff/40001/cc/resources/gpu_rasterizer.cc#newcode125 cc/resources/gpu_rasterizer.cc:125: if (!sk_surface) Can you add a comment explaining this ...
5 years, 9 months ago (2015-03-09 16:38:04 UTC) #10
vmiura
PTAL https://codereview.chromium.org/988953002/diff/40001/cc/resources/gpu_rasterizer.cc File cc/resources/gpu_rasterizer.cc (right): https://codereview.chromium.org/988953002/diff/40001/cc/resources/gpu_rasterizer.cc#newcode125 cc/resources/gpu_rasterizer.cc:125: if (!sk_surface) On 2015/03/09 16:38:03, danakj wrote: > ...
5 years, 9 months ago (2015-03-09 18:01:26 UTC) #11
danakj
LGTM thanks
5 years, 9 months ago (2015-03-09 18:04:46 UTC) #12
danakj
btw is this something we can unit test? should be possible
5 years, 9 months ago (2015-03-09 18:04:59 UTC) #13
vmiura
piman@ / sievers@: Please take a look at context_provider_command_buffer.cc Added unit test for context lost ...
5 years, 9 months ago (2015-03-09 21:16:42 UTC) #16
no sievers
https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc File content/common/gpu/client/context_provider_command_buffer.cc (right): https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc#newcode139 content/common/gpu/client/context_provider_command_buffer.cc:139: gr_context_->OnLostContext(); Can abandonContext() safely be called more than once? ...
5 years, 9 months ago (2015-03-09 21:25:48 UTC) #17
vmiura
https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc File content/common/gpu/client/context_provider_command_buffer.cc (right): https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc#newcode139 content/common/gpu/client/context_provider_command_buffer.cc:139: gr_context_->OnLostContext(); On 2015/03/09 21:25:48, sievers wrote: > Can abandonContext() ...
5 years, 9 months ago (2015-03-09 21:42:52 UTC) #19
piman
https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc File content/common/gpu/client/context_provider_command_buffer.cc (right): https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc#newcode138 content/common/gpu/client/context_provider_command_buffer.cc:138: if (gr_context_ && IsContextLost()) nit: no need to test ...
5 years, 9 months ago (2015-03-09 22:22:05 UTC) #20
vmiura
https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc File content/common/gpu/client/context_provider_command_buffer.cc (right): https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc#newcode138 content/common/gpu/client/context_provider_command_buffer.cc:138: if (gr_context_ && IsContextLost()) On 2015/03/09 22:22:05, piman (Very ...
5 years, 9 months ago (2015-03-09 22:39:02 UTC) #21
bsalomon
On 2015/03/09 21:42:52, vmiura wrote: > https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc > File content/common/gpu/client/context_provider_command_buffer.cc (right): > > https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc#newcode139 > ...
5 years, 9 months ago (2015-03-09 22:58:02 UTC) #22
vmiura
PTAL https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc File content/common/gpu/client/context_provider_command_buffer.cc (right): https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc#newcode138 content/common/gpu/client/context_provider_command_buffer.cc:138: if (gr_context_ && IsContextLost()) On 2015/03/09 22:39:01, vmiura ...
5 years, 9 months ago (2015-03-09 23:10:01 UTC) #23
vmiura
On 2015/03/09 23:10:01, vmiura wrote: > PTAL > > https://codereview.chromium.org/988953002/diff/100001/content/common/gpu/client/context_provider_command_buffer.cc > File content/common/gpu/client/context_provider_command_buffer.cc (right): > ...
5 years, 9 months ago (2015-03-11 17:49:41 UTC) #24
piman
lgtm
5 years, 9 months ago (2015-03-11 18:20:16 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/988953002/120001
5 years, 9 months ago (2015-03-11 19:38:43 UTC) #28
commit-bot: I haz the power
Committed patchset #4 (id:120001)
5 years, 9 months ago (2015-03-11 21:50:12 UTC) #29
commit-bot: I haz the power
5 years, 9 months ago (2015-03-11 21:51:29 UTC) #30
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/4cf8d357f19f4f5c4a8628ef43d352f8e003226a
Cr-Commit-Position: refs/heads/master@{#320153}

Powered by Google App Engine
This is Rietveld 408576698