Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Starred by 3 users
Status: Fixed
Owner:
Closed: Jun 6
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 563816



Sign in to add a comment
OffscreenCanvas animation loop keeps spinning when tab is backgrounded
Project Member Reported by junov@chromium.org, Apr 26 Back to list
When the document that hosts the placeholder canvas associated with an offscreenCanvas loses visibility, commit() based rendering loops should get suspended.
 
Summary: OffscreenCanvas animation loop keeps spinning when tab is backgrounded (was: OffscreenAnimation loop keep spinning when tab is backgrounded)
Project Member Comment 2 by bugdroid1@chromium.org, Jun 2
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/91df781f34d5b85eb66a24cff17baff4034e8073

commit 91df781f34d5b85eb66a24cff17baff4034e8073
Author: Justin Novosad <junov@chromium.org>
Date: Fri Jun 02 13:52:10 2017

Simplify canvas context creation code

This refactor CL unifies the OffscreenCanvas and HTMLCanvasElement
code paths for rendering context creation. It also removes the
unnecessary ScriptState* argument in some places, which will make it
simpler to write unit tests that need to create OffscreenCanvas
rendering contexts

Bug:  715757 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ib9c7bd6d6a073e8f0d60f4566dfdee32e59a5704
Reviewed-on: https://chromium-review.googlesource.com/521683
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Commit-Queue: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#476630}
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/LayoutTests/fast/canvas/webgl/webgl-drawing-buffer-error-response.html
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContextFactory.h
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContextHost.h
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.h
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasModules.cpp
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasModules.h
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasModules.idl
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.cpp
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.h
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/91df781f34d5b85eb66a24cff17baff4034e8073/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h

Project Member Comment 3 by bugdroid1@chromium.org, Jun 6
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cfb35dd20e4dbab24f638e389ef17cc94f3a6da2

commit cfb35dd20e4dbab24f638e389ef17cc94f3a6da2
Author: Justin Novosad <junov@chromium.org>
Date: Tue Jun 06 15:44:20 2017

Halt OffscreenCanvas animations when page is hidden

This CL uses a (possibly) cross-thread asynchronous signal to notify
OffscreenCanvasFrameDispatcherImpl that it's associated placeholder
canvas has changed its visibility state.  This information is in turn
used to suspend animation in the OffscreenCanvas.

TBR=haraken@chromium.org

Bug:  715757 
Change-Id: Ib41a76585a8a3fdc79ca43cf30b6229d3015807d
Reviewed-on: https://chromium-review.googlesource.com/523664
Commit-Queue: Justin Novosad <junov@chromium.org>
Reviewed-by: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477297}
[modify] https://crrev.com/cfb35dd20e4dbab24f638e389ef17cc94f3a6da2/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/cfb35dd20e4dbab24f638e389ef17cc94f3a6da2/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
[modify] https://crrev.com/cfb35dd20e4dbab24f638e389ef17cc94f3a6da2/third_party/WebKit/Source/modules/BUILD.gn
[add] https://crrev.com/cfb35dd20e4dbab24f638e389ef17cc94f3a6da2/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasTest.cpp
[modify] https://crrev.com/cfb35dd20e4dbab24f638e389ef17cc94f3a6da2/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
[modify] https://crrev.com/cfb35dd20e4dbab24f638e389ef17cc94f3a6da2/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h
[modify] https://crrev.com/cfb35dd20e4dbab24f638e389ef17cc94f3a6da2/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/cfb35dd20e4dbab24f638e389ef17cc94f3a6da2/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
[modify] https://crrev.com/cfb35dd20e4dbab24f638e389ef17cc94f3a6da2/third_party/WebKit/Source/platform/graphics/OffscreenCanvasPlaceholder.cpp
[modify] https://crrev.com/cfb35dd20e4dbab24f638e389ef17cc94f3a6da2/third_party/WebKit/Source/platform/graphics/OffscreenCanvasPlaceholder.h

Status: Fixed
Sign in to add a comment