New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 606688 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Investigate performance problems for 'Canvas suite > Canvas put/get image data' benchmark

Project Member Reported by dk...@chromium.org, Apr 26 2016

Issue description

All benchmarks are under pr.gg/animometer/developer.html

- Set "Ramp" mode for benchmarking.
- Set "Keep at a fixed complexity" for profiling.  Set an appropriate [high] complexity next to each test's name.

File any performance bugs found as blocking this issue.
 

Comment 1 by dk...@chromium.org, Apr 27 2016

Owner: ojan@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by dk...@chromium.org, May 20 2016

Ping! Any specific insights for this benchmark?

Comment 3 by junov@chromium.org, Jun 10 2016

Cc: sebastienlc@google.com ojan@chromium.org
Owner: junov@chromium.org
I'll take this if you don't mind.

Comment 4 by junov@chromium.org, Jun 10 2016

Components: Blink>Canvas
Status: Started (was: Assigned)

Comment 5 by junov@chromium.org, Jun 20 2016

Labels: -Pri-1 Pri-2
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 23 2016

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

commit 33732aec33c88cb18c212544da7d0a4ba53cd9ce
Author: junov <junov@chromium.org>
Date: Thu Jun 23 23:20:10 2016

Make 2D canvas disable gpu acceleration when getImageData is called

In order to optimize performance, GPU-accelerated canvases should
permanently switch out of accalerated mode as soon as
getImageData is called.  The cost of getImageData on the GPU is
so prohibitively high that it almost always outways the benefit
of acceleration.

This is the first time we implement a SW/GPU switch that can happen
after the first frame was presented, which may result in a small one
time glitch due to rendering engine discrepancies. Let's see if we get
any complaints about this.  If there are complaints, we may inhibit
the switch based on what kind of content was rendered to the canvas.

BUG= 606688 

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

[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/blink_platform.gypi
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/graphics/ImageBufferClient.h
[modify] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
[add] https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce/third_party/WebKit/Source/platform/graphics/test/FakeWebGraphicsContext3DProvider.h

Project Member

Comment 7 by bugdroid1@chromium.org, Jun 28 2016

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

commit 27543ee6015a5d358e3abdb6ffb6121f6c847e31
Author: sunnyps <sunnyps@chromium.org>
Date: Tue Jun 28 03:40:50 2016

Revert of Make 2D canvas disable gpu acceleration when getImageData is called (patchset #6 id:100001 of https://codereview.chromium.org/2063473002/ )

Reason for revert:
Causing crash in mailbox release callback - bug 623101

Original issue's description:
> Make 2D canvas disable gpu acceleration when getImageData is called
>
> In order to optimize performance, GPU-accelerated canvases should
> permanently switch out of accalerated mode as soon as
> getImageData is called.  The cost of getImageData on the GPU is
> so prohibitively high that it almost always outways the benefit
> of acceleration.
>
> This is the first time we implement a SW/GPU switch that can happen
> after the first frame was presented, which may result in a small one
> time glitch due to rendering engine discrepancies. Let's see if we get
> any complaints about this.  If there are complaints, we may inhibit
> the switch based on what kind of content was rendered to the canvas.
>
> BUG= 606688 
>
> Committed: https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce
> Cr-Commit-Position: refs/heads/master@{#401751}

TBR=xlai@chromium.org,xidachen@chromium.org,junov@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 606688 , 623101

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

[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/platform/blink_platform.gypi
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/platform/graphics/ImageBufferClient.h
[modify] https://crrev.com/27543ee6015a5d358e3abdb6ffb6121f6c847e31/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
[delete] https://crrev.com/bf1875afad559e02cb26093ccbba79bbcfa9fcac/third_party/WebKit/Source/platform/graphics/test/FakeWebGraphicsContext3DProvider.h

Project Member

Comment 8 by bugdroid1@chromium.org, Jun 28 2016

Labels: merge-merged-2781
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bdcdef6016573af7637162b330813f4b343bb1d9

commit bdcdef6016573af7637162b330813f4b343bb1d9
Author: Sunny Sachanandani <sunnyps@chromium.org>
Date: Tue Jun 28 03:49:04 2016

Revert of Make 2D canvas disable gpu acceleration when getImageData is called (patchset #6 id:100001 of https://codereview.chromium.org/2063473002/ )

Reason for revert:
Causing crash in mailbox release callback - bug 623101

Original issue's description:
> Make 2D canvas disable gpu acceleration when getImageData is called
>
> In order to optimize performance, GPU-accelerated canvases should
> permanently switch out of accalerated mode as soon as
> getImageData is called.  The cost of getImageData on the GPU is
> so prohibitively high that it almost always outways the benefit
> of acceleration.
>
> This is the first time we implement a SW/GPU switch that can happen
> after the first frame was presented, which may result in a small one
> time glitch due to rendering engine discrepancies. Let's see if we get
> any complaints about this.  If there are complaints, we may inhibit
> the switch based on what kind of content was rendered to the canvas.
>
> BUG= 606688 
>
> Committed: https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce
> Cr-Commit-Position: refs/heads/master@{#401751}

TBR=xlai@chromium.org,xidachen@chromium.org,junov@chromium.org
BUG= 606688 , 623101

Review-Url: https://codereview.chromium.org/2101823002
Cr-Commit-Position: refs/heads/master@{#402391}
(cherry picked from commit 27543ee6015a5d358e3abdb6ffb6121f6c847e31)

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

Cr-Commit-Position: refs/branch-heads/2781@{#2}
Cr-Branched-From: d855b4a44ca015cc874b69b828717bb4293c3092-refs/heads/master@{#402177}

[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/platform/blink_platform.gypi
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/platform/graphics/ImageBufferClient.h
[modify] https://crrev.com/bdcdef6016573af7637162b330813f4b343bb1d9/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
[delete] https://crrev.com/001995d55c01f61e2da3793f6bb2eee251ac2b6d/third_party/WebKit/Source/platform/graphics/test/FakeWebGraphicsContext3DProvider.h

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 28 2016

Labels: merge-merged-2782
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5

commit d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5
Author: Steven Bennetts <stevenjb@chromium.org>
Date: Tue Jun 28 22:32:22 2016

Revert of Make 2D canvas disable gpu acceleration when getImageData is called (patchset #6 id:100001 of https://codereview.chromium.org/2063473002/ )

Reason for revert:
Causing crash in mailbox release callback - bug 623101

Original issue's description:
> Make 2D canvas disable gpu acceleration when getImageData is called
>
> In order to optimize performance, GPU-accelerated canvases should
> permanently switch out of accalerated mode as soon as
> getImageData is called.  The cost of getImageData on the GPU is
> so prohibitively high that it almost always outways the benefit
> of acceleration.
>
> This is the first time we implement a SW/GPU switch that can happen
> after the first frame was presented, which may result in a small one
> time glitch due to rendering engine discrepancies. Let's see if we get
> any complaints about this.  If there are complaints, we may inhibit
> the switch based on what kind of content was rendered to the canvas.
>
> BUG= 606688 
>
> Committed: https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce
> Cr-Commit-Position: refs/heads/master@{#401751}

TBR=xlai@chromium.org,xidachen@chromium.org,junov@chromium.org
BUG= 606688 , 623101

Review-Url: https://codereview.chromium.org/2101823002
Cr-Commit-Position: refs/heads/master@{#402391}
(cherry picked from commit 27543ee6015a5d358e3abdb6ffb6121f6c847e31)

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

Cr-Commit-Position: refs/branch-heads/2782@{#8}
Cr-Branched-From: 4f1d832918c5966df3cc8ac1d23c8c1544262cee-refs/heads/master@{#402386}

[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/blink_platform.gypi
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/ImageBufferClient.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
[delete] https://crrev.com/d79e8de9352ad3e4a266f45f7fbd8ade494bc0ac/third_party/WebKit/Source/platform/graphics/test/FakeWebGraphicsContext3DProvider.h

Project Member

Comment 10 by bugdroid1@chromium.org, Jun 28 2016

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

commit d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5
Author: Steven Bennetts <stevenjb@chromium.org>
Date: Tue Jun 28 22:32:22 2016

Revert of Make 2D canvas disable gpu acceleration when getImageData is called (patchset #6 id:100001 of https://codereview.chromium.org/2063473002/ )

Reason for revert:
Causing crash in mailbox release callback - bug 623101

Original issue's description:
> Make 2D canvas disable gpu acceleration when getImageData is called
>
> In order to optimize performance, GPU-accelerated canvases should
> permanently switch out of accalerated mode as soon as
> getImageData is called.  The cost of getImageData on the GPU is
> so prohibitively high that it almost always outways the benefit
> of acceleration.
>
> This is the first time we implement a SW/GPU switch that can happen
> after the first frame was presented, which may result in a small one
> time glitch due to rendering engine discrepancies. Let's see if we get
> any complaints about this.  If there are complaints, we may inhibit
> the switch based on what kind of content was rendered to the canvas.
>
> BUG= 606688 
>
> Committed: https://crrev.com/33732aec33c88cb18c212544da7d0a4ba53cd9ce
> Cr-Commit-Position: refs/heads/master@{#401751}

TBR=xlai@chromium.org,xidachen@chromium.org,junov@chromium.org
BUG= 606688 , 623101

Review-Url: https://codereview.chromium.org/2101823002
Cr-Commit-Position: refs/heads/master@{#402391}
(cherry picked from commit 27543ee6015a5d358e3abdb6ffb6121f6c847e31)

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

Cr-Commit-Position: refs/branch-heads/2782@{#8}
Cr-Branched-From: 4f1d832918c5966df3cc8ac1d23c8c1544262cee-refs/heads/master@{#402386}

[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/blink_platform.gypi
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/ImageBufferClient.h
[modify] https://crrev.com/d8c223f065fa757ffbd6bf986a93a5fcd1d98fa5/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
[delete] https://crrev.com/d79e8de9352ad3e4a266f45f7fbd8ade494bc0ac/third_party/WebKit/Source/platform/graphics/test/FakeWebGraphicsContext3DProvider.h

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 5 2016

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

commit 627ddfd0de197d67567a15191f654b8835408bce
Author: junov <junov@chromium.org>
Date: Tue Jul 05 18:28:04 2016

Reland: Make 2D canvas disable gpu acceleration when getImageData is called

In order to optimize performance, GPU-accelerated canvases should
permanently switch out of accalerated mode as soon as
getImageData is called.  The cost of getImageData on the GPU is
so prohibitively high that it almost always outways the benefit
of acceleration.

This is the first time we implement a SW/GPU switch that can happen
after the first frame was presented, which may result in a small one
time glitch due to rendering engine discrepancies. Let's see if we get
any complaints about this.  If there are complaint, we may inhibit
the switch based on what kind of content was rendered to the canvas.

BUG= 606688 

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

[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/blink_platform.gypi
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/graphics/ImageBufferClient.h
[modify] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
[add] https://crrev.com/627ddfd0de197d67567a15191f654b8835408bce/third_party/WebKit/Source/platform/graphics/test/FakeWebGraphicsContext3DProvider.h

Status: Fixed (was: Started)
Project Member

Comment 13 by bugdroid1@chromium.org, Jul 6 2016

Project Member

Comment 14 by bugdroid1@chromium.org, Jul 21 2016

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

commit e56410217e3d336d0c2d1dbc442180aefba935c5
Author: junov <junov@chromium.org>
Date: Thu Jul 21 21:24:34 2016

Re-enable canvas optimization for getImageData with new codepath

This change re-enables the optimization that makes canvases switch
out of gpu-acceleration when getImageData is called.  The old
implementation was scrapped in favor of the new
ImageBuffer::disableAcceleration method that was introduced by
https://crrev.com/98739b054a5b28cc607d688b2e9e582456bbb20e

BUG= 606688 

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

[modify] https://crrev.com/e56410217e3d336d0c2d1dbc442180aefba935c5/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/e56410217e3d336d0c2d1dbc442180aefba935c5/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
[modify] https://crrev.com/e56410217e3d336d0c2d1dbc442180aefba935c5/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
[modify] https://crrev.com/e56410217e3d336d0c2d1dbc442180aefba935c5/third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h
[modify] https://crrev.com/e56410217e3d336d0c2d1dbc442180aefba935c5/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h
[modify] https://crrev.com/e56410217e3d336d0c2d1dbc442180aefba935c5/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp

Sign in to add a comment