New issue
Advanced search Search tips
Starred by 7 users
Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Blocked on:
issue 563826
issue 629566
issue 645173

Blocking:
issue 563816
issue 563858



Sign in to add a comment
Implement <canvas>.transferControlToOffscreen() + commit()
Project Member Reported by junov@chromium.org, Dec 1 2015 Back to list
Implement <canvas>.transferControlToOffscreen() + commit()
Get the commit flow to work just on the main thread at first
 
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:563858
Comment 4 by xlai@chromium.org, May 13 2016
Blockedon: 611796
Project Member Comment 5 by bugdroid1@chromium.org, Jun 20 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e93a0d29e98d8770319072162eb420fd81758f6d

commit e93a0d29e98d8770319072162eb420fd81758f6d
Author: xlai <xlai@chromium.org>
Date: Mon Jun 20 23:44:48 2016

Establish mojo service between Canvas (blink) and SurfaceManager (browser)

This patch adds a new mojo message pipe between Canvas in blink and
the Surface management on browser, to facilitate the out-of-process commit flow
from OffscreenCanvas to browser. This patch only implements the first two
IPC to ensure SurfaceLayer on renderer, SurfaceId/Surface on browser are
created.

The implementation can be seen in three parts: client, browser host, and mojo
service interface. Some codes are added to an existing layout test to test if
the whole workflow works.

Client:
CanvasSurfaceLayerBridge is HTMLCanvasElement's communicator with SurfaceLayer.
It is created only when HTMLCanvasElement.transferControlToOffscreen() is invoked.
It has an instance of CanvasSurfaceLayerBridgeClient, which is a virtual interface
containing all mojo calls. To create a SurfaceLayer, it sends a sync msg
"GetSurfaceId" to browser to retrieve a unique SurfaceId. Immediately after that,
it sends an async msg "RequestSurfaceCreation" to request Surface getting created
for this particular Id. After that, it creates a SurfaceLayer (with SatisfyCallback
and RequireCallback) for HTMLCanvasElement and set the SurfaceId for the layer and
registers it to the graphics layer. A unit test is added; it fakes the browser side
and mocks the BridgeClient.

Browser:
OffscreenCanvasSurfaceServiceImpl sits on the other end of the mojo message pipe.
It is created when all the mojo connections are registered in render_process_host.
It responds to requests from CanvasSurfaceLayerBridge and do SurfaceId generation,
SurfaceFactory and Surface creation accordingly. It is a client of SurfaceFactory.

Mojo service interface:
It is defined in offscreen_canvas_surface_service.mojom. It defines two structs:
SurfaceId and SurfaceSequence, that correspondds to that in cc. I use typemaps to
convert cc::SurfaceId and cc::SurfaceSequence to the corresponding mojo intermediate
structs.

BUG=611796, 563852
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2036663003
Cr-Commit-Position: refs/heads/master@{#400838}

[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/cc/ipc/BUILD.gn
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/cc/ipc/surface_id_struct_traits.h
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/cc/ipc/surface_sequence_struct_traits.h
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/content/browser/DEPS
[add] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/content/browser/renderer_host/offscreen_canvas_surface_impl.cc
[add] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/content/browser/renderer_host/offscreen_canvas_surface_impl.h
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/content/content_browser.gypi
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen-expected.txt
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.h
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModuleTest.cpp
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/platform/blink_platform.gyp
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/platform/blink_platform.gypi
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h
[add] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h
[add] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClientImpl.cpp
[add] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClientImpl.h
[add] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/Source/platform/mojo/blink_typemaps.gni
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/public/BUILD.gn
[modify] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/public/blink.gyp
[add] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/public/platform/modules/offscreencanvas/OWNERS
[add] https://crrev.com/e93a0d29e98d8770319072162eb420fd81758f6d/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom

Comment 6 by junov@chromium.org, Jul 5 2016
Cc: -xlai@chromium.org junov@chromium.org
Owner: xlai@chromium.org
Comment 7 by xlai@chromium.org, Jul 19 2016
Blockedon: 629566
The next step of commit() implementation is to add a new interface to submit compositor frame. Right now, cc::CompositorFrame already has its mojom type defined in cc/ipc/compositor_frame.mojom.

It's an un-trivial efforts to use compositor_frame.mojom in Blink, because its struct_traits and the dependents' struct_traits all need to be transformed into partial template specialization so that it could be shared between Blink and Chromium.  I may need multiple patches to finish this import process; thus, opening another bug elsewhere and working on it.
Comment 8 by xlai@chromium.org, Jul 19 2016
Cc: xlai@chromium.org ajuma@chromium.org
Issue 611796 has been merged into this issue.
Comment 9 by xlai@chromium.org, Jul 19 2016
Blockedon: -611796
Comment 10 by xlai@chromium.org, Sep 2 2016
Status: Started
Issue 629566 is unblocked; resume work on commit().
Project Member Comment 11 by bugdroid1@chromium.org, Sep 3 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/94a3a26405be3996569d9006b29d0460bb9e8dca

commit 94a3a26405be3996569d9006b29d0460bb9e8dca
Author: xlai <xlai@chromium.org>
Date: Sat Sep 03 03:17:02 2016

Submit Compositor Frame from OffscreenCanvas on main

CompositorFrame is to be submitted from OffscreenCanvas from
either main or worker thread (but not both at the same time);
therefore, another interface "OffscreenCanvasFrameReceiver"
is created only when commit() is invoked.

This CL follows the class design structure in this diagram:
www.lucidchart.com/documents/view/346a55cc-0ab1-48e8-9d34-90f59d36094e

Currently, we only submit a Green color frame for simplicity.
More CLs will follow to fill in image data to the compositor
frame.

BUG=563852

Review-Url: https://codereview.chromium.org/2294963002
Cr-Commit-Position: refs/heads/master@{#416436}

[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/content/browser/renderer_host/OWNERS
[add] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.cc
[add] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.h
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/content/content_browser.gypi
[add] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-main-expected.html
[add] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-main.html
[delete] https://crrev.com/dd458e6dffeee1721b4c02ccf56d798cff02d1da/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen-expected.txt
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.idl
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/Source/platform/BUILD.gn
[add] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h
[add] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[add] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
[modify] https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom

Project Member Comment 12 by bugdroid1@chromium.org, Sep 5 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab7f06aeaff3d24a161eb1bbfa246839a362525f

commit ab7f06aeaff3d24a161eb1bbfa246839a362525f
Author: mgiuca <mgiuca@chromium.org>
Date: Mon Sep 05 06:07:14 2016

Revert of Submit Compositor Frame from OffscreenCanvas on main (patchset #10 id:200001 of https://codereview.chromium.org/2294963002/ )

Reason for revert:
The new OffscreenCanvas-commit-main tests are broken on MSAN on Linux:
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20MSAN/builds/12023

Reason: use-of-uninitialized-value

unexpected_failures:
fast/canvas/OffscreenCanvas-commit-main.html
virtual/gpu/fast/canvas/OffscreenCanvas-commit-main.html
virtual/display_list_2d_canvas/fast/canvas/OffscreenCanvas-commit-main.html

Original issue's description:
> Submit Compositor Frame from OffscreenCanvas on main
>
> CompositorFrame is to be submitted from OffscreenCanvas from
> either main or worker thread (but not both at the same time);
> therefore, another interface "OffscreenCanvasFrameReceiver"
> is created only when commit() is invoked.
>
> This CL follows the class design structure in this diagram:
> www.lucidchart.com/documents/view/346a55cc-0ab1-48e8-9d34-90f59d36094e
>
> Currently, we only submit a Green color frame for simplicity.
> More CLs will follow to fill in image data to the compositor
> frame.
>
> BUG=563852
>
> Committed: https://crrev.com/94a3a26405be3996569d9006b29d0460bb9e8dca
> Cr-Commit-Position: refs/heads/master@{#416436}

TBR=junov@chromium.org,danakj@chromium.org,tsepez@chromium.org,sievers@chromium.org,xlai@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=563852

Review-Url: https://codereview.chromium.org/2313533002
Cr-Commit-Position: refs/heads/master@{#416503}

[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/content/browser/renderer_host/OWNERS
[delete] https://crrev.com/0dcfd301c47f8510004c295f14f348fd601e2c4e/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.cc
[delete] https://crrev.com/0dcfd301c47f8510004c295f14f348fd601e2c4e/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.h
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/content/content_browser.gypi
[delete] https://crrev.com/0dcfd301c47f8510004c295f14f348fd601e2c4e/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-main-expected.html
[delete] https://crrev.com/0dcfd301c47f8510004c295f14f348fd601e2c4e/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-main.html
[add] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen-expected.txt
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.idl
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/Source/platform/BUILD.gn
[delete] https://crrev.com/0dcfd301c47f8510004c295f14f348fd601e2c4e/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h
[delete] https://crrev.com/0dcfd301c47f8510004c295f14f348fd601e2c4e/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[delete] https://crrev.com/0dcfd301c47f8510004c295f14f348fd601e2c4e/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
[modify] https://crrev.com/ab7f06aeaff3d24a161eb1bbfa246839a362525f/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom

Project Member Comment 13 by bugdroid1@chromium.org, Sep 6 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287

commit 88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287
Author: xlai <xlai@chromium.org>
Date: Tue Sep 06 20:45:49 2016

Reland Submit Compositor Frame from OffscreenCanvas on main

This is a reland patch of https://codereview.chromium.org/2294963002 after
adding default values to CompositorFrameMetadata.

BUG=563852
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
TBR=danakj@chromium.org, tsepez@chromium.org, sievers@chromium.org, junov@chromium.org

Review-Url: https://codereview.chromium.org/2316643003
Cr-Commit-Position: refs/heads/master@{#416718}

[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/cc/output/compositor_frame_metadata.h
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/content/browser/renderer_host/OWNERS
[add] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.cc
[add] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.h
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/content/content_browser.gypi
[add] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-main-expected.html
[add] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-main.html
[delete] https://crrev.com/fbe37a3e6651922530417a53ea7af5442a2370ff/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen-expected.txt
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.idl
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/Source/platform/BUILD.gn
[add] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h
[add] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[add] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
[modify] https://crrev.com/88f87af3fcc069d0f3ba16a60a98aa2b1e6b7287/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom

Comment 14 by xlai@chromium.org, Sep 8 2016
Blockedon: 645173
Project Member Comment 15 by bugdroid1@chromium.org, Sep 12 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9237ff22c578869bbb2615f5ce2f17b3b05be6c1

commit 9237ff22c578869bbb2615f5ce2f17b3b05be6c1
Author: xlai <xlai@chromium.org>
Date: Mon Sep 12 16:17:32 2016

Disallow resizing on OffscreenCanvas that has been transferred control from canvas

In my previous patch (https://codereview.chromium.org/2294963002/)
I had some primitive ideas about disallowing resizing on
OffscreenCanvas. This CL makes it more assertive by throwing
exception (not just causing no effect) to alert users.

BUG=563852

Review-Url: https://codereview.chromium.org/2330553002
Cr-Commit-Position: refs/heads/master@{#417951}

[modify] https://crrev.com/9237ff22c578869bbb2615f5ce2f17b3b05be6c1/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html
[modify] https://crrev.com/9237ff22c578869bbb2615f5ce2f17b3b05be6c1/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
[modify] https://crrev.com/9237ff22c578869bbb2615f5ce2f17b3b05be6c1/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
[modify] https://crrev.com/9237ff22c578869bbb2615f5ce2f17b3b05be6c1/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.idl

Project Member Comment 16 by bugdroid1@chromium.org, Sep 13 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/85264448db0298f836e6d7bf95ad11134637e4ed

commit 85264448db0298f836e6d7bf95ad11134637e4ed
Author: xlai <xlai@chromium.org>
Date: Tue Sep 13 00:13:21 2016

Disallow users modify canvas after it transfers control to offscreen

After a canvas has transferred its control to Offscreen, we should not allow
users to perform resizing, toDataURL, toBlob and getContext.

BUG=563852

Review-Url: https://codereview.chromium.org/2323933004
Cr-Commit-Position: refs/heads/master@{#418114}

[modify] https://crrev.com/85264448db0298f836e6d7bf95ad11134637e4ed/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html
[modify] https://crrev.com/85264448db0298f836e6d7bf95ad11134637e4ed/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/85264448db0298f836e6d7bf95ad11134637e4ed/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/85264448db0298f836e6d7bf95ad11134637e4ed/third_party/WebKit/Source/core/html/HTMLCanvasElement.idl
[modify] https://crrev.com/85264448db0298f836e6d7bf95ad11134637e4ed/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
[modify] https://crrev.com/85264448db0298f836e6d7bf95ad11134637e4ed/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.h
[modify] https://crrev.com/85264448db0298f836e6d7bf95ad11134637e4ed/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.idl
[modify] https://crrev.com/85264448db0298f836e6d7bf95ad11134637e4ed/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp

Project Member Comment 17 by bugdroid1@chromium.org, Sep 13 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2d2c91639476064fd5e5d4b08cae3fd65ca5b8da

commit 2d2c91639476064fd5e5d4b08cae3fd65ca5b8da
Author: kjellander <kjellander@chromium.org>
Date: Tue Sep 13 07:43:12 2016

Revert of Disallow users modify canvas after it transfers control to offscreen (patchset #3 id:60001 of https://codereview.chromium.org/2323933004/ )

Reason for revert:
Breaks webkit_tests consistently after submit: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Leak/builds/22857

Original issue's description:
> Disallow users modify canvas after it transfers control to offscreen
>
> After a canvas has transferred its control to Offscreen, we should not allow
> users to perform resizing, toDataURL, toBlob and getContext.
>
> BUG=563852
>
> Committed: https://crrev.com/85264448db0298f836e6d7bf95ad11134637e4ed
> Cr-Commit-Position: refs/heads/master@{#418114}

TBR=junov@chromium.org,xlai@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=563852

Review-Url: https://codereview.chromium.org/2335903003
Cr-Commit-Position: refs/heads/master@{#418188}

[modify] https://crrev.com/2d2c91639476064fd5e5d4b08cae3fd65ca5b8da/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html
[modify] https://crrev.com/2d2c91639476064fd5e5d4b08cae3fd65ca5b8da/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/2d2c91639476064fd5e5d4b08cae3fd65ca5b8da/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/2d2c91639476064fd5e5d4b08cae3fd65ca5b8da/third_party/WebKit/Source/core/html/HTMLCanvasElement.idl
[modify] https://crrev.com/2d2c91639476064fd5e5d4b08cae3fd65ca5b8da/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
[modify] https://crrev.com/2d2c91639476064fd5e5d4b08cae3fd65ca5b8da/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.h
[modify] https://crrev.com/2d2c91639476064fd5e5d4b08cae3fd65ca5b8da/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.idl
[modify] https://crrev.com/2d2c91639476064fd5e5d4b08cae3fd65ca5b8da/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp

Project Member Comment 18 by bugdroid1@chromium.org, Sep 13 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3e197101b919d7fd7d64fbebabaaefc0c1f68344

commit 3e197101b919d7fd7d64fbebabaaefc0c1f68344
Author: xlai <xlai@chromium.org>
Date: Tue Sep 13 20:43:55 2016

Disallow users modify canvas after it transfers control to offscreen

After a canvas has transferred its control to Offscreen, we should not allow
users to perform resizing, toDataURL, toBlob and getContext.

This is a reland of
https://crrev.com/85264448db0298f836e6d7bf95ad11134637e4ed
at refs/heads/master@{#418114}.

BUG=563852

Review-Url: https://codereview.chromium.org/2323933004
Cr-Commit-Position: refs/heads/master@{#418357}

[modify] https://crrev.com/3e197101b919d7fd7d64fbebabaaefc0c1f68344/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html
[modify] https://crrev.com/3e197101b919d7fd7d64fbebabaaefc0c1f68344/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/3e197101b919d7fd7d64fbebabaaefc0c1f68344/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/3e197101b919d7fd7d64fbebabaaefc0c1f68344/third_party/WebKit/Source/core/html/HTMLCanvasElement.idl
[modify] https://crrev.com/3e197101b919d7fd7d64fbebabaaefc0c1f68344/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
[modify] https://crrev.com/3e197101b919d7fd7d64fbebabaaefc0c1f68344/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.h
[modify] https://crrev.com/3e197101b919d7fd7d64fbebabaaefc0c1f68344/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.idl
[modify] https://crrev.com/3e197101b919d7fd7d64fbebabaaefc0c1f68344/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp

Project Member Comment 19 by bugdroid1@chromium.org, Sep 13 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a3987c8b93d3abbba6ea4e438493bf996fff66b7

commit a3987c8b93d3abbba6ea4e438493bf996fff66b7
Author: xlai <xlai@chromium.org>
Date: Tue Sep 13 23:09:51 2016

Make Surface creation lazy for OffscreenCanvasFrameReceiverImpl

This CL shifts the SurfaceFactory pointer and SurfaceFactoryClient implementation
 from OffscreenCanvasSurfaceImpl to OffscreenCanvasFrameReceiverImpl to
facilitate resource handling after compositor frame is submitted. As a result,
surface on browser is lazily created (only happened on the first commit()).

BUG=563852

Review-Url: https://codereview.chromium.org/2333133003
Cr-Commit-Position: refs/heads/master@{#418402}

[modify] https://crrev.com/a3987c8b93d3abbba6ea4e438493bf996fff66b7/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.cc
[modify] https://crrev.com/a3987c8b93d3abbba6ea4e438493bf996fff66b7/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.h
[modify] https://crrev.com/a3987c8b93d3abbba6ea4e438493bf996fff66b7/content/browser/renderer_host/offscreen_canvas_surface_impl.cc
[modify] https://crrev.com/a3987c8b93d3abbba6ea4e438493bf996fff66b7/content/browser/renderer_host/offscreen_canvas_surface_impl.h
[modify] https://crrev.com/a3987c8b93d3abbba6ea4e438493bf996fff66b7/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
[modify] https://crrev.com/a3987c8b93d3abbba6ea4e438493bf996fff66b7/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClient.h
[modify] https://crrev.com/a3987c8b93d3abbba6ea4e438493bf996fff66b7/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClientImpl.cpp
[modify] https://crrev.com/a3987c8b93d3abbba6ea4e438493bf996fff66b7/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeClientImpl.h
[modify] https://crrev.com/a3987c8b93d3abbba6ea4e438493bf996fff66b7/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp
[modify] https://crrev.com/a3987c8b93d3abbba6ea4e438493bf996fff66b7/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom

Project Member Comment 20 by bugdroid1@chromium.org, Sep 14 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f528273138a75fb028ccb5d962c4ef7fa26d477e

commit f528273138a75fb028ccb5d962c4ef7fa26d477e
Author: kainino <kainino@chromium.org>
Date: Wed Sep 14 22:09:10 2016

Roll WebGL 582169b..65c5e7b

https://chromium.googlesource.com/external/khronosgroup/webgl.git/+log/582169b..65c5e7b

BUG=563852

TEST=bots

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2339603004
Cr-Commit-Position: refs/heads/master@{#418693}

[modify] https://crrev.com/f528273138a75fb028ccb5d962c4ef7fa26d477e/DEPS

Project Member Comment 21 by bugdroid1@chromium.org, Sep 20 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6267a77aa199671dce58a41639b40021db18f7d6

commit 6267a77aa199671dce58a41639b40021db18f7d6
Author: xidachen <xidachen@chromium.org>
Date: Tue Sep 20 15:24:38 2016

Implement WebGL's commit on the main thread.

This CL implements WebGL's commit() API. It uses the frame work established
for the OffscreenCanvasRenderingContext2D. The basic procedure is to
get a AcceleratedStaticBitmapImage from WebGL's drawingBuffer. The
StaticBitmapImage contains a SkImage that is gpu texture backed, a gpu
mailbox, and a gpu token. We then prepare a CompositorFrame from the
gpu mailbox and the gpu token. It currently works on the main thread
only, making it work on worker thread will come in another CL.

A gpu pixel test is added to make sure that the commit actually commits
to the original HTMLCanvasElement. A layout test is added to ensure
that when an OffscreenCanvas is not constructed from transferControlToOffscreen,
then InvalidStateError must be thrown.

BUG=563852, 619136
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2328463004
Cr-Commit-Position: refs/heads/master@{#419771}

[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/content/browser/BUILD.gn
[add] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc
[add] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h
[add] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_provider_impl.cc
[add] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_provider_impl.h
[delete] https://crrev.com/1d02359b751f01cd5fbce1086c3d08f51e378712/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.cc
[delete] https://crrev.com/1d02359b751f01cd5fbce1086c3d08f51e378712/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.h
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/content/browser/renderer_host/render_process_host_impl.cc
[add] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_main.html
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/content/test/gpu/gpu_tests/pixel_expectations.py
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/content/test/gpu/gpu_tests/trace_test_expectations.py
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/content/test/gpu/page_sets/pixel_tests.py
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-invalid-call.html
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.idl
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.h
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h
[modify] https://crrev.com/6267a77aa199671dce58a41639b40021db18f7d6/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom

Project Member Comment 22 by bugdroid1@chromium.org, Sep 21 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3d94ca5729af33523e919f7af0cb2209fb339930

commit 3d94ca5729af33523e919f7af0cb2209fb339930
Author: xidachen <xidachen@chromium.org>
Date: Wed Sep 21 13:18:31 2016

Add a new shared page state in pixel_tests.py

In a previous CL:https://codereview.chromium.org/2328463004/, there was
a pixel test that is added which test WebGL's commit() function. What
was missing in that CL is that the test requires an additional browser
arg: --enable-experimental-canvas-features. Without this flag, it is
causing timeout exception.

This CL adds a new shared page state with that flag, which should make
the bots correctly run this test and generate reference images.

BUG=563852
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2355913002
Cr-Commit-Position: refs/heads/master@{#420033}

[modify] https://crrev.com/3d94ca5729af33523e919f7af0cb2209fb339930/content/test/gpu/gpu_tests/trace_test.py
[modify] https://crrev.com/3d94ca5729af33523e919f7af0cb2209fb339930/content/test/gpu/gpu_tests/trace_test_expectations.py
[modify] https://crrev.com/3d94ca5729af33523e919f7af0cb2209fb339930/content/test/gpu/page_sets/pixel_tests.py

Project Member Comment 23 by bugdroid1@chromium.org, Sep 22 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ec8349cfc41f8abb93e5b60561b3fbe3d541fb05

commit ec8349cfc41f8abb93e5b60561b3fbe3d541fb05
Author: xidachen <xidachen@chromium.org>
Date: Thu Sep 22 11:32:12 2016

Update pixel test expectation and add new worker tests

In the previous CL: https://codereview.chromium.org/2328463004/ where
the commit() function is implemented, we add a new pixel test and put its
expectation to fail. Now that the reference image has been generated on
all GPU waterfall bots, it is time to update the expectation.

This CL also adds a new test to make sure that WebGL's commit()
is behaving as expected on a worker thread.

BUG=563852
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2358833002
Cr-Commit-Position: refs/heads/master@{#420304}

[add] https://crrev.com/ec8349cfc41f8abb93e5b60561b3fbe3d541fb05/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_worker.html
[modify] https://crrev.com/ec8349cfc41f8abb93e5b60561b3fbe3d541fb05/content/test/gpu/gpu_tests/pixel_expectations.py
[modify] https://crrev.com/ec8349cfc41f8abb93e5b60561b3fbe3d541fb05/content/test/gpu/page_sets/pixel_tests.py

Project Member Comment 24 by bugdroid1@chromium.org, Sep 22 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7968aade49c199e9168b88c8fec330287da80c41

commit 7968aade49c199e9168b88c8fec330287da80c41
Author: ricea <ricea@chromium.org>
Date: Thu Sep 22 12:49:16 2016

Revert of Update pixel test expectation and add new worker tests (patchset #7 id:120001 of https://codereview.chromium.org/2358833002/ )

Reason for revert:
Appears to have broken pixel_tests on Win7 Release (NVIDIA) and Linux Release (NVIDIA) bots.

Original issue's description:
> Update pixel test expectation and add new worker tests
>
> In the previous CL: https://codereview.chromium.org/2328463004/ where
> the commit() function is implemented, we add a new pixel test and put its
> expectation to fail. Now that the reference image has been generated on
> all GPU waterfall bots, it is time to update the expectation.
>
> This CL also adds a new test to make sure that WebGL's commit()
> is behaving as expected on a worker thread.
>
> BUG=563852
> CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel
>
> Committed: https://crrev.com/ec8349cfc41f8abb93e5b60561b3fbe3d541fb05
> Cr-Commit-Position: refs/heads/master@{#420304}

TBR=junov@chromium.org,kbr@chromium.org,zmo@chromium.org,bajones@chromium.org,xidachen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=563852

Review-Url: https://codereview.chromium.org/2359123002
Cr-Commit-Position: refs/heads/master@{#420313}

[delete] https://crrev.com/fa0484e92febcc21716103bbb18c24cb847ef06b/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_worker.html
[modify] https://crrev.com/7968aade49c199e9168b88c8fec330287da80c41/content/test/gpu/gpu_tests/pixel_expectations.py
[modify] https://crrev.com/7968aade49c199e9168b88c8fec330287da80c41/content/test/gpu/page_sets/pixel_tests.py

Project Member Comment 25 by bugdroid1@chromium.org, Sep 22 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/03083077956acc232b34b1a51e13ffe4c1f139a2

commit 03083077956acc232b34b1a51e13ffe4c1f139a2
Author: xidachen <xidachen@chromium.org>
Date: Thu Sep 22 17:13:51 2016

Update pixel test expectation and add new worker tests

In the previous CL: https://codereview.chromium.org/2328463004/ where
the commit() function is implemented, we add a new pixel test and put its
expectation to fail. Now that the reference image has been generated on
all GPU waterfall bots, it is time to update the expectation.

This CL also adds a new test to make sure that WebGL's commit()
is behaving as expected on a worker thread.

BUG=563852
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Committed: https://crrev.com/ec8349cfc41f8abb93e5b60561b3fbe3d541fb05
Review-Url: https://codereview.chromium.org/2358833002
Cr-Original-Commit-Position: refs/heads/master@{#420304}
Cr-Commit-Position: refs/heads/master@{#420379}

[add] https://crrev.com/03083077956acc232b34b1a51e13ffe4c1f139a2/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_worker.html
[modify] https://crrev.com/03083077956acc232b34b1a51e13ffe4c1f139a2/content/test/gpu/gpu_tests/pixel_expectations.py
[modify] https://crrev.com/03083077956acc232b34b1a51e13ffe4c1f139a2/content/test/gpu/page_sets/pixel_tests.py

Project Member Comment 26 by bugdroid1@chromium.org, Sep 23 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/feeffa93ab854317d5435f6c9a2a17d1e49b6857

commit feeffa93ab854317d5435f6c9a2a17d1e49b6857
Author: xidachen <xidachen@chromium.org>
Date: Fri Sep 23 18:59:27 2016

Fix a gpu pixel test for WebGL's commit() API

When this test: pixel_offscreenCanvas_webgl_commit_worker.html was added,
the generated reference image is a blank image which is incorrect. Now
we have fixed the problem, the reference image needs to be updated. So
this CL increment the revision number for the test by 1. This CL also
updates the test by post an empty message back from worker-->main thread.

BUG=563852
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2359263002
Cr-Commit-Position: refs/heads/master@{#420683}

[modify] https://crrev.com/feeffa93ab854317d5435f6c9a2a17d1e49b6857/content/test/data/gpu/pixel_offscreenCanvas_webgl_commit_worker.html
[modify] https://crrev.com/feeffa93ab854317d5435f6c9a2a17d1e49b6857/content/test/gpu/page_sets/pixel_tests.py

Project Member Comment 27 by bugdroid1@chromium.org, Sep 23 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/971faed800d30243b9ff37e5dbdfe3d55209d4ad

commit 971faed800d30243b9ff37e5dbdfe3d55209d4ad
Author: xlai <xlai@chromium.org>
Date: Fri Sep 23 23:33:21 2016

Implement OffscreenCanvas Accelerated 2D commit()

This CL makes commit() on accelerated 2d context on OffscreenCanvas work.

BUG=563852
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2359723003
Cr-Commit-Position: refs/heads/master@{#420785}

[add] https://crrev.com/971faed800d30243b9ff37e5dbdfe3d55209d4ad/content/test/data/gpu/pixel_acceleratedOffscreen2d_commit_main.html
[add] https://crrev.com/971faed800d30243b9ff37e5dbdfe3d55209d4ad/content/test/data/gpu/pixel_acceleratedOffscreen2d_commit_worker.html
[modify] https://crrev.com/971faed800d30243b9ff37e5dbdfe3d55209d4ad/content/test/gpu/gpu_tests/pixel_expectations.py
[modify] https://crrev.com/971faed800d30243b9ff37e5dbdfe3d55209d4ad/content/test/gpu/page_sets/pixel_tests.py
[modify] https://crrev.com/971faed800d30243b9ff37e5dbdfe3d55209d4ad/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/971faed800d30243b9ff37e5dbdfe3d55209d4ad/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
[modify] https://crrev.com/971faed800d30243b9ff37e5dbdfe3d55209d4ad/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/971faed800d30243b9ff37e5dbdfe3d55209d4ad/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h

Project Member Comment 28 by bugdroid1@chromium.org, Sep 30 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f2246b3d3631e26bdf958bbd59cadd57938826b8

commit f2246b3d3631e26bdf958bbd59cadd57938826b8
Author: xlai <xlai@chromium.org>
Date: Fri Sep 30 21:53:02 2016

Implement OffscreenCanvas Unaccelerated 2d commit() on main thread

BUG=563852
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2360413002
Cr-Commit-Position: refs/heads/master@{#422231}

[rename] https://crrev.com/f2246b3d3631e26bdf958bbd59cadd57938826b8/content/test/data/gpu/pixel_offscreenCanvas_2d_commit_main.html
[rename] https://crrev.com/f2246b3d3631e26bdf958bbd59cadd57938826b8/content/test/data/gpu/pixel_offscreenCanvas_2d_commit_worker.html
[modify] https://crrev.com/f2246b3d3631e26bdf958bbd59cadd57938826b8/content/test/gpu/gpu_tests/pixel_expectations.py
[modify] https://crrev.com/f2246b3d3631e26bdf958bbd59cadd57938826b8/content/test/gpu/gpu_tests/pixel_test_pages.py
[modify] https://crrev.com/f2246b3d3631e26bdf958bbd59cadd57938826b8/content/test/gpu/page_sets/pixel_tests.py
[modify] https://crrev.com/f2246b3d3631e26bdf958bbd59cadd57938826b8/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/f2246b3d3631e26bdf958bbd59cadd57938826b8/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h

Project Member Comment 29 by bugdroid1@chromium.org, Oct 4 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5371a41d019eb15db652d406a7c0f63ea179cbbe

commit 5371a41d019eb15db652d406a7c0f63ea179cbbe
Author: xidachen <xidachen@chromium.org>
Date: Tue Oct 04 21:01:32 2016

Implement commit for unaccelerated canvas with GPU compositing

This CL implements OffscreenCanvas2d's commit API in the case where the
canvas is not GPU-accelerated, but the compositor is. In this case, we
extract a StaticBitmapImage from the imageBuffer, upload the CPU memory
that the StaticBitmapImage holds to GPU texture, and prepare a
CompositorFrame from the GPU texture.

A GPU pixel test is added to test this code path.

BUG=563852
TBR=kbr@chromium.org
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2376743002
Cr-Commit-Position: refs/heads/master@{#422927}

[modify] https://crrev.com/5371a41d019eb15db652d406a7c0f63ea179cbbe/content/test/gpu/gpu_tests/pixel_expectations.py
[modify] https://crrev.com/5371a41d019eb15db652d406a7c0f63ea179cbbe/content/test/gpu/gpu_tests/pixel_test_pages.py
[modify] https://crrev.com/5371a41d019eb15db652d406a7c0f63ea179cbbe/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/5371a41d019eb15db652d406a7c0f63ea179cbbe/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h

Project Member Comment 30 by bugdroid1@chromium.org, Oct 5 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/26d11c7a25f75595b0c020298d3544c8b43c0922

commit 26d11c7a25f75595b0c020298d3544c8b43c0922
Author: xidachen <xidachen@chromium.org>
Date: Wed Oct 05 03:21:02 2016

Remove failure entries in gpu pixel test

Two of the newly added pixel tests have been picked up by all GPU bots.
One of the tests failed on Mac Retina with Nvidia GPU, it is likely due
to the device ratio, marking it as failure for now, and will fix it later.

BUG=563852
TBR=kbr@chromium.org
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2389313003
Cr-Commit-Position: refs/heads/master@{#423065}

[modify] https://crrev.com/26d11c7a25f75595b0c020298d3544c8b43c0922/content/test/gpu/gpu_tests/pixel_expectations.py

Project Member Comment 31 by bugdroid1@chromium.org, Oct 5 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5280614b9452793b73489cb103cd740ea24f638f

commit 5280614b9452793b73489cb103cd740ea24f638f
Author: xlai <xlai@chromium.org>
Date: Wed Oct 05 16:34:04 2016

Remove failed entries and skip Android tests for gpu pixel expectations

The two unaccelerated 2d gpu integration tests are working
fine in Win,Linux and Mac. So I'm removing their failed
entries.

Because software compositing is not supported on Android.
These two tests should not be running on Android platforms.
So I mark them as Skipped.

TBR=kbr@chromium.org
BUG=563852
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2388803002
Cr-Commit-Position: refs/heads/master@{#423184}

[modify] https://crrev.com/5280614b9452793b73489cb103cd740ea24f638f/content/test/gpu/gpu_tests/pixel_expectations.py

Project Member Comment 32 by bugdroid1@chromium.org, Oct 6 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/595e3b2511f9fbeefe0f174a66a5503a13775427

commit 595e3b2511f9fbeefe0f174a66a5503a13775427
Author: xidachen <xidachen@chromium.org>
Date: Thu Oct 06 11:41:20 2016

Implement WebGL's commit with software compositing

We already have all the code infra available, we just need to check
whether there are command-line flags --disable-gpu-compositing ||
--disable-gpu or not, also checking WebGraphicsContext3DProvider::
isSoftwareRendering.

Two pixel tests are added with --disable-gpu-compositing to make sure
that the code works.

BUG=563852
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2391883004
Cr-Commit-Position: refs/heads/master@{#423500}

[modify] https://crrev.com/595e3b2511f9fbeefe0f174a66a5503a13775427/content/test/gpu/gpu_tests/pixel_expectations.py
[modify] https://crrev.com/595e3b2511f9fbeefe0f174a66a5503a13775427/content/test/gpu/gpu_tests/pixel_test_pages.py
[modify] https://crrev.com/595e3b2511f9fbeefe0f174a66a5503a13775427/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/595e3b2511f9fbeefe0f174a66a5503a13775427/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h
[modify] https://crrev.com/595e3b2511f9fbeefe0f174a66a5503a13775427/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/595e3b2511f9fbeefe0f174a66a5503a13775427/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h

Project Member Comment 33 by bugdroid1@chromium.org, Oct 6 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/09783caa4de8a31afa087a665ef95911e3598456

commit 09783caa4de8a31afa087a665ef95911e3598456
Author: xidachen <xidachen@chromium.org>
Date: Thu Oct 06 16:53:59 2016

Remove two lines of failure entries in gpu pixel expectation page

Our previous CL: https://codereview.chromium.org/2391883004/ that
implements WebGL's commit with software compositing has been picked up
by all GPU bots, and all generated images are looking good. So this CL
removes these two failure entires.

BUG=563852
TBR=kbr@chromium.org
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2398093002
Cr-Commit-Position: refs/heads/master@{#423563}

[modify] https://crrev.com/09783caa4de8a31afa087a665ef95911e3598456/content/test/gpu/gpu_tests/pixel_expectations.py

Project Member Comment 34 by bugdroid1@chromium.org, Oct 8 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6482715536e43777022b2e63e3f2a1247c8d4a00

commit 6482715536e43777022b2e63e3f2a1247c8d4a00
Author: xlai <xlai@chromium.org>
Date: Fri Oct 07 23:58:46 2016

Clean up logic flow in OffscreenCanvasFrameDispatcher

This CL causes no behavior change.

BUG=563852

Review-Url: https://codereview.chromium.org/2396403002
Cr-Commit-Position: refs/heads/master@{#424020}

[modify] https://crrev.com/6482715536e43777022b2e63e3f2a1247c8d4a00/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/6482715536e43777022b2e63e3f2a1247c8d4a00/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h

Comment 35 by xlai@chromium.org, Oct 20 2016
Labels: -OffscreenCanvas OffScreenCanvas
Status: Fixed
This feature is generally completed. Although there are still some rooms for optimization but those are marked in other bugs.
Project Member Comment 36 by bugdroid1@chromium.org, Oct 27 2016
Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5280614b9452793b73489cb103cd740ea24f638f

commit 5280614b9452793b73489cb103cd740ea24f638f
Author: xlai <xlai@chromium.org>
Date: Wed Oct 05 16:34:04 2016

Remove failed entries and skip Android tests for gpu pixel expectations

The two unaccelerated 2d gpu integration tests are working
fine in Win,Linux and Mac. So I'm removing their failed
entries.

Because software compositing is not supported on Android.
These two tests should not be running on Android platforms.
So I mark them as Skipped.

TBR=kbr@chromium.org
BUG=563852
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2388803002
Cr-Commit-Position: refs/heads/master@{#423184}

[modify] https://crrev.com/5280614b9452793b73489cb103cd740ea24f638f/content/test/gpu/gpu_tests/pixel_expectations.py

Project Member Comment 37 by bugdroid1@chromium.org, Oct 27 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/595e3b2511f9fbeefe0f174a66a5503a13775427

commit 595e3b2511f9fbeefe0f174a66a5503a13775427
Author: xidachen <xidachen@chromium.org>
Date: Thu Oct 06 11:41:20 2016

Implement WebGL's commit with software compositing

We already have all the code infra available, we just need to check
whether there are command-line flags --disable-gpu-compositing ||
--disable-gpu or not, also checking WebGraphicsContext3DProvider::
isSoftwareRendering.

Two pixel tests are added with --disable-gpu-compositing to make sure
that the code works.

BUG=563852
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2391883004
Cr-Commit-Position: refs/heads/master@{#423500}

[modify] https://crrev.com/595e3b2511f9fbeefe0f174a66a5503a13775427/content/test/gpu/gpu_tests/pixel_expectations.py
[modify] https://crrev.com/595e3b2511f9fbeefe0f174a66a5503a13775427/content/test/gpu/gpu_tests/pixel_test_pages.py
[modify] https://crrev.com/595e3b2511f9fbeefe0f174a66a5503a13775427/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/595e3b2511f9fbeefe0f174a66a5503a13775427/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h
[modify] https://crrev.com/595e3b2511f9fbeefe0f174a66a5503a13775427/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/595e3b2511f9fbeefe0f174a66a5503a13775427/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h

Project Member Comment 38 by bugdroid1@chromium.org, Oct 27 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/09783caa4de8a31afa087a665ef95911e3598456

commit 09783caa4de8a31afa087a665ef95911e3598456
Author: xidachen <xidachen@chromium.org>
Date: Thu Oct 06 16:53:59 2016

Remove two lines of failure entries in gpu pixel expectation page

Our previous CL: https://codereview.chromium.org/2391883004/ that
implements WebGL's commit with software compositing has been picked up
by all GPU bots, and all generated images are looking good. So this CL
removes these two failure entires.

BUG=563852
TBR=kbr@chromium.org
CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2398093002
Cr-Commit-Position: refs/heads/master@{#423563}

[modify] https://crrev.com/09783caa4de8a31afa087a665ef95911e3598456/content/test/gpu/gpu_tests/pixel_expectations.py

Comment 39 Deleted
Comment 40 by dimu@google.com, Nov 4 2016
Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840
Sign in to add a comment