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

Issue 211503006: Implementation of 2D canvas context lost/restored events (Closed)

Created:
6 years, 9 months ago by Justin Novosad
Modified:
6 years, 8 months ago
Reviewers:
Stephen White
CC:
blink-reviews, apavlov+blink_chromium.org, adamk+blink_chromium.org, aandrey+blink_chromium.org, rwlbuis, jamesr, caseq+blink_chromium.org, krit, arv+blink, dsinclair, yurys+blink_chromium.org, danakj, dglazkov+blink, Rik, devtools-reviews_chromium.org, pdr., loislo+blink_chromium.org, jbroman, lushnikov+blink_chromium.org, eustas+blink_chromium.org, paulirish+reviews_chromium.org, alph+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, Inactive, Stephen Chennney, watchdog-blink-watchlist_google.com
Visibility:
Public.

Description

Implementation of 2D canvas context lost/restored events This change adds the APIs specified in the feature proposal found here: http://wiki.whatwg.org/wiki/Canvas_Context_Loss_and_Restoration The API changes are hidden behind the experimental canvas features flag. This change does not implement any elective canvas evictions. Those will be added in a future change. Only pre-existing context loss use cases are handled, such as failure to allocate a backing store, and gpu failures. The strategy for recovering from a GPU context lost was modified substantially in order to accomodate synchronization issues with the context restored event. Context restoration is now attempted proactively through a scheduled event. Prior to this change, restoration happened lazily when trying to use the canvas. BUG=322335 R=senorblanco@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170572

Patch Set 1 #

Patch Set 2 : adding missing file #

Total comments: 4

Patch Set 3 : applied review comments #

Patch Set 4 : null ptr check #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+483 lines, -335 lines) Patch
D LayoutTests/fast/canvas/canvas-extremely-large-dimensions.html View 1 chunk +0 lines, -9 lines 0 comments Download
D LayoutTests/fast/canvas/canvas-extremely-large-dimensions-expected.txt View 1 chunk +0 lines, -33 lines 0 comments Download
A + LayoutTests/fast/canvas/canvas-lose-restore-googol-size.html View 1 2 1 chunk +52 lines, -17 lines 0 comments Download
A + LayoutTests/fast/canvas/canvas-lose-restore-googol-size-expected.txt View 1 1 chunk +15 lines, -4 lines 0 comments Download
A + LayoutTests/fast/canvas/canvas-lose-restore-max-int-size.html View 1 1 chunk +58 lines, -72 lines 0 comments Download
A + LayoutTests/fast/canvas/canvas-lose-restore-max-int-size-expected.txt View 1 1 chunk +15 lines, -4 lines 0 comments Download
D LayoutTests/fast/canvas/script-tests/canvas-extremely-large-dimensions.js View 1 chunk +0 lines, -85 lines 0 comments Download
M LayoutTests/fast/canvas/script-tests/canvas-lost-gpu-context.js View 1 chunk +42 lines, -43 lines 0 comments Download
M LayoutTests/inspector/profiler/canvas2d/canvas2d-api-changes-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/virtual/gpu/fast/canvas/canvas-lost-gpu-context-expected.txt View 1 chunk +10 lines, -9 lines 0 comments Download
M Source/core/events/EventTypeNames.in View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLCanvasElement.h View 1 2 3 4 5 chunks +9 lines, -3 lines 0 comments Download
M Source/core/html/HTMLCanvasElement.cpp View 1 2 3 4 6 chunks +30 lines, -0 lines 0 comments Download
M Source/core/html/canvas/Canvas2DContextAttributes.h View 2 chunks +10 lines, -0 lines 0 comments Download
M Source/core/html/canvas/Canvas2DContextAttributes.cpp View 2 chunks +21 lines, -0 lines 0 comments Download
M Source/core/html/canvas/Canvas2DContextAttributes.idl View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.h View 1 2 3 4 4 chunks +16 lines, -0 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.cpp View 1 2 3 4 4 chunks +102 lines, -1 line 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.idl View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M Source/platform/blink_platform.gypi View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M Source/platform/graphics/Canvas2DImageBufferSurface.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M Source/platform/graphics/Canvas2DLayerBridge.h View 1 2 3 chunks +7 lines, -3 lines 0 comments Download
M Source/platform/graphics/Canvas2DLayerBridge.cpp View 1 2 3 4 8 chunks +24 lines, -23 lines 0 comments Download
M Source/platform/graphics/ImageBuffer.h View 4 chunks +8 lines, -1 line 0 comments Download
M Source/platform/graphics/ImageBuffer.cpp View 11 chunks +27 lines, -11 lines 0 comments Download
A + Source/platform/graphics/ImageBufferClient.h View 1 2 chunks +9 lines, -7 lines 0 comments Download
M Source/platform/graphics/ImageBufferSurface.h View 3 chunks +6 lines, -7 lines 0 comments Download
M Source/platform/graphics/ImageBufferSurface.cpp View 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Justin Novosad
PTAL
6 years, 9 months ago (2014-03-25 21:53:47 UTC) #1
Justin Novosad
Intent to implement thread: https://groups.google.com/a/chromium.org/forum/#!searchin/blink-dev/intent$20lost$20restored/blink-dev/CQIwXxKpO_Q/aQao7yaJE7oJ
6 years, 9 months ago (2014-03-25 22:03:37 UTC) #2
Stephen White
Some preliminary comments; I'll take a closer look tomorrow. https://codereview.chromium.org/211503006/diff/70001/LayoutTests/fast/canvas/canvas-lose-restore-googol-size.html File LayoutTests/fast/canvas/canvas-lose-restore-googol-size.html (right): https://codereview.chromium.org/211503006/diff/70001/LayoutTests/fast/canvas/canvas-lose-restore-googol-size.html#newcode22 LayoutTests/fast/canvas/canvas-lose-restore-googol-size.html:22: ...
6 years, 9 months ago (2014-03-25 23:25:04 UTC) #3
Justin Novosad
> https://codereview.chromium.org/211503006/diff/70001/Source/platform/graphics/ImageBufferClient.h#newcode36 > Source/platform/graphics/ImageBufferClient.h:36: class ImageBufferClient { > This is so small, I'd just put ...
6 years, 9 months ago (2014-03-27 17:33:42 UTC) #4
Justin Novosad
New Patch
6 years, 9 months ago (2014-03-27 17:35:32 UTC) #5
Stephen White
On 2014/03/27 17:33:42, junov wrote: > > > https://codereview.chromium.org/211503006/diff/70001/Source/platform/graphics/ImageBufferClient.h#newcode36 > > Source/platform/graphics/ImageBufferClient.h:36: class ImageBufferClient { ...
6 years, 9 months ago (2014-03-27 17:53:58 UTC) #6
Justin Novosad
On 2014/03/27 17:53:58, Stephen White wrote: > > New patch LGTM. Thanks. I'll wait for ...
6 years, 9 months ago (2014-03-27 18:32:52 UTC) #7
Justin Novosad
On 2014/03/27 18:32:52, junov wrote: > On 2014/03/27 17:53:58, Stephen White wrote: > > > ...
6 years, 9 months ago (2014-03-27 19:02:48 UTC) #8
Justin Novosad
New patch: Added null pointer check in HTMLCanvasElement::setSurfaceSize
6 years, 9 months ago (2014-03-27 19:10:17 UTC) #9
Stephen White
On 2014/03/27 19:10:17, junov wrote: > New patch: Added null pointer check in HTMLCanvasElement::setSurfaceSize New ...
6 years, 9 months ago (2014-03-27 19:32:53 UTC) #10
Justin Novosad
The CQ bit was checked by junov@chromium.org
6 years, 8 months ago (2014-03-31 20:27:45 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/junov@chromium.org/211503006/150001
6 years, 8 months ago (2014-03-31 20:27:50 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-03-31 20:28:08 UTC) #13
commit-bot: I haz the power
Failed to apply patch for Source/platform/graphics/Canvas2DLayerBridge.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 8 months ago (2014-03-31 20:28:09 UTC) #14
Justin Novosad
The CQ bit was checked by junov@chromium.org
6 years, 8 months ago (2014-03-31 20:42:10 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/junov@chromium.org/211503006/170001
6 years, 8 months ago (2014-03-31 20:42:34 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-03-31 21:39:41 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 8 months ago (2014-03-31 21:39:42 UTC) #18
Justin Novosad
6 years, 8 months ago (2014-04-01 14:43:27 UTC) #19
Message was sent while issue was closed.
Committed patchset #5 manually as r170572 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698