New issue
Advanced search Search tips
Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature


Sign in to add a comment

Implement OffscreenCanvas.getContext

Project Member Reported by junov@chromium.org, Dec 1 2015 Back to list

Issue description

Implement OffscreenCanvas.getContext, and support 2d context creation on the main thread.

 

Comment 1 by junov@chromium.org, Dec 1 2015

Blocking: chromium:563816

Comment 2 by junov@chromium.org, Dec 1 2015

Labels: OffscreenCanvas

Comment 3 by junov@chromium.org, Dec 1 2015

Blocking: chromium:563827

Comment 4 by junov@chromium.org, Dec 1 2015

Blocking: chromium:563830

Comment 5 by junov@chromium.org, Dec 1 2015

Blocking: chromium:563832

Comment 6 by junov@chromium.org, Dec 1 2015

Blocking: chromium:563845

Comment 7 by junov@chromium.org, Dec 1 2015

Blocking: chromium:563852

Comment 8 by junov@chromium.org, Dec 1 2015

Blocking: chromium:563870
Labels: -Cr-Blink Cr-Blink-Canvas
Blocking: chromium:565077
Status: Assigned

Comment 12 by xlai@chromium.org, Feb 4 2016

Status: Started
Project Member

Comment 13 by bugdroid1@chromium.org, Feb 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9c74567e241b46365ecb48f88c62ff5b993ae2bb

commit 9c74567e241b46365ecb48f88c62ff5b993ae2bb
Author: xlai <xlai@chromium.org>
Date: Fri Feb 05 01:46:27 2016

Make CanvasRenderingContext not inherit from ActiveDOMObject

The first step before sharing CanvasRenderingContext (CRC) between
HTMLCanvasElement and OffscreenCanvas is to take away the inheritance
relationship between CRC and ActiveDOMObject. It is not right that both
HTMLCanvasElement and its associated CRC are monitoring Document separately.
Instead, we add willDetachDocument() to DocumentVisibilityObserver, so that
when Document is detached, HTMLCanvasElement will notice this change and call
willDetachDocument() to promptly propagates the change to its associated CRC,
and CRC will invoke stop() to lose context.

BUG= 563826 

Review URL: https://codereview.chromium.org/1662423002

Cr-Commit-Position: refs/heads/master@{#373711}

[modify] http://crrev.com/9c74567e241b46365ecb48f88c62ff5b993ae2bb/third_party/WebKit/Source/core/dom/Document.cpp
[modify] http://crrev.com/9c74567e241b46365ecb48f88c62ff5b993ae2bb/third_party/WebKit/Source/core/dom/DocumentTest.cpp
[modify] http://crrev.com/9c74567e241b46365ecb48f88c62ff5b993ae2bb/third_party/WebKit/Source/core/dom/DocumentVisibilityObserver.h
[modify] http://crrev.com/9c74567e241b46365ecb48f88c62ff5b993ae2bb/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] http://crrev.com/9c74567e241b46365ecb48f88c62ff5b993ae2bb/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] http://crrev.com/9c74567e241b46365ecb48f88c62ff5b993ae2bb/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
[modify] http://crrev.com/9c74567e241b46365ecb48f88c62ff5b993ae2bb/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h

Project Member

Comment 14 by bugdroid1@chromium.org, Mar 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a9fbf504f0677ae17f568914138d7709aa72c126

commit a9fbf504f0677ae17f568914138d7709aa72c126
Author: xlai <xlai@chromium.org>
Date: Tue Mar 08 04:41:01 2016

Add rendering context and rendering 2D context to OffscreenCanvas

This patch implements the getContext() function in OffscreenCanvas.
It also implements the skeleton of  OffscreenCanvasRenderingContext2D, an object type
returned by getContext("2d").

BUG= 563826 

Review URL: https://codereview.chromium.org/1748163003

Cr-Commit-Position: refs/heads/master@{#379740}

[delete] https://crrev.com/6b4fd8c7083a2a31786e4ee83ab909c00f5fdfdc/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-constructor-expected.txt
[delete] https://crrev.com/6b4fd8c7083a2a31786e4ee83ab909c00f5fdfdc/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-constructor.html
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-expected.txt
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-in-worker-expected.txt
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-in-worker.html
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D.html
[modify] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/core/core.gypi
[modify] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
[delete] https://crrev.com/6b4fd8c7083a2a31786e4ee83ab909c00f5fdfdc/third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.cpp
[delete] https://crrev.com/6b4fd8c7083a2a31786e4ee83ab909c00f5fdfdc/third_party/WebKit/Source/core/html/canvas/OffscreenCanvas.h
[modify] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/InitModules.cpp
[modify] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h
[modify] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/modules.gypi
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/offscreencanvas/OWNERS
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.cpp
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h
[rename] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.idl
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.cpp
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContext.h
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasRenderingContextFactory.h
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/offscreencanvas2d/OWNERS
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
[add] https://crrev.com/a9fbf504f0677ae17f568914138d7709aa72c126/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.idl

This is awesome!

Comment 16 by xlai@chromium.org, Mar 14 2016

Status: Fixed (was: Started)

Comment 17 by kbr@chromium.org, Jan 12 2017

Cc: junov@chromium.org haraken@chromium.org dominicc@chromium.org brat...@opera.com abarth@chromium.org kbr@chromium.org xlai@chromium.org tkent@chromium.org jochen@chromium.org
 Issue 458168  has been merged into this issue.

Sign in to add a comment