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

Issue 1367683002: Make 2D canvas smarter about chosing whether or not to use GPU acceleration (Closed)

Created:
5 years, 3 months ago by Justin Novosad
Modified:
5 years, 3 months ago
CC:
chromium-reviews, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make 2D canvas smarter about chosing whether or not to use GPU acceleration The CL takes advantage of the fact that canvas rendering is deferred to defer the decision of whether or not a canvas should be GPU-accelerated. The decision is made based on the conditions under which a canvas is flushed for the first time. For example, if the purpose of the first flush is to perform a readback, then GPU-acceleration will be disabled for the canvas in order to avoid reading GPU memory into RAM, which is known to be a slow path. BUG=265849 TBR=senorblanco@chromium.org, kbr@chromium.org NOTRY=true Committed: https://crrev.com/9ac9c385c8f55f826c42e1f3a56cf66600b9e934 Cr-Commit-Position: refs/heads/master@{#350655}

Patch Set 1 #

Patch Set 2 : added nullptr check + fixed style check errors #

Unified diffs Side-by-side diffs Delta from patch set Stats (+380 lines, -165 lines) Patch
M third_party/WebKit/Source/core/css/CSSCanvasValue.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/Editor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.h View 3 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 8 chunks +14 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLImageElement.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLImageElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLVideoElement.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLVideoElement.cpp View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasImageSource.h View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp View 1 4 chunks +10 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp View 1 14 chunks +25 lines, -28 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h View 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h View 5 chunks +15 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp View 1 21 chunks +128 lines, -57 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp View 10 chunks +131 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsTypes.h View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.h View 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp View 4 chunks +16 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBufferSurface.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18 (5 generated)
Justin Novosad
using TBR because l-g-t-m were already obtained here before the blink-chromium merge: https://codereview.chromium.org/1307143005/
5 years, 3 months ago (2015-09-23 20:40:17 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1367683002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1367683002/1
5 years, 3 months ago (2015-09-23 20:42:00 UTC) #3
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/117054)
5 years, 3 months ago (2015-09-24 01:05:35 UTC) #5
Ken Russell (switch to Gerrit)
On 2015/09/24 01:05:35, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 3 months ago (2015-09-24 01:37:37 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1367683002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1367683002/20001
5 years, 3 months ago (2015-09-24 18:17:12 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/107437)
5 years, 3 months ago (2015-09-24 20:10:08 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1367683002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1367683002/20001
5 years, 3 months ago (2015-09-24 20:36:31 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 3 months ago (2015-09-24 20:44:10 UTC) #13
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/9ac9c385c8f55f826c42e1f3a56cf66600b9e934 Cr-Commit-Position: refs/heads/master@{#350655}
5 years, 3 months ago (2015-09-24 20:45:11 UTC) #14
Ken Russell (switch to Gerrit)
On 2015/09/24 20:10:08, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 3 months ago (2015-09-24 21:17:39 UTC) #15
Justin Novosad
I was sure I was in the clear when I saw the same tests fail ...
5 years, 3 months ago (2015-09-24 21:36:26 UTC) #16
Justin Novosad
Reverting.
5 years, 3 months ago (2015-09-24 21:37:29 UTC) #17
Justin Novosad
5 years, 3 months ago (2015-09-24 21:38:03 UTC) #18
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in
https://codereview.chromium.org/1361043003/ by junov@chromium.org.

The reason for reverting is: Patch has test failures.

Powered by Google App Engine
This is Rietveld 408576698