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

Issue 2362363002: Cancel GPU acceleration for 2D canvas when drawing very large images (Closed)

Created:
4 years, 3 months ago by Justin Novosad
Modified:
4 years, 2 months ago
Reviewers:
xidachen, xlai (Olivia)
CC:
chromium-reviews, blink-reviews-platform-graphics_chromium.org, dshwang, eric.carlson_apple.com, Srirama, rwlbuis, krit, drott+blinkwatch_chromium.org, blink-reviews-html_chromium.org, dglazkov+blink, Rik, blink-reviews, ajuma+watch_chromium.org, jbroman, feature-media-reviews_chromium.org, pdr+graphicswatchlist_chromium.org, haraken, danakj+watch_chromium.org, ajuma+watch-canvas_chromium.org, mlamouri+watch-blink_chromium.org, f(malita), Stephen Chennney
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cancel GPU acceleration for 2D canvas when drawing very large images GPU texture upload overhead is often prohibitively expensive when drawing very large images into a canvas. This change adds an heuristic to trigger a fallback to software rendering when this happens TBR=kbr@chromium.org BUG=367355 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel Committed: https://crrev.com/03b1013d9a855aba76fa626a640b08b95146154f Cr-Commit-Position: refs/heads/master@{#421651}

Patch Set 1 #

Total comments: 7

Patch Set 2 : nits #

Patch Set 3 : fix sqrt #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -9 lines) Patch
M third_party/WebKit/Source/core/frame/ImageBitmap.h View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLImageElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLVideoElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasImageSource.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp View 2 chunks +20 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp View 1 2 2 chunks +51 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DUsageTrackingTest.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h View 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp View 1 chunk +7 lines, -5 lines 0 comments Download

Messages

Total messages: 32 (18 generated)
Justin Novosad
PTAL
4 years, 3 months ago (2016-09-23 18:38:51 UTC) #4
xlai (Olivia)
https://codereview.chromium.org/2362363002/diff/1/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp File third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp (right): https://codereview.chromium.org/2362363002/diff/1/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp#newcode161 third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp:161: return m_context && m_context->isAccelerated(); Just want to let you ...
4 years, 3 months ago (2016-09-23 20:48:04 UTC) #8
xidachen
https://codereview.chromium.org/2362363002/diff/1/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp File third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp (right): https://codereview.chromium.org/2362363002/diff/1/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp#newcode1090 third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp:1090: if (srcArea > dstArea * ExpensiveCanvasHeuristicParameters::DrawImageTextureUploadSoftSizeLimitScaleThreshold) { I am ...
4 years, 3 months ago (2016-09-23 20:56:36 UTC) #9
Justin Novosad
On 2016/09/23 20:56:36, xidachen wrote: > https://codereview.chromium.org/2362363002/diff/1/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp > File third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp > (right): > > https://codereview.chromium.org/2362363002/diff/1/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp#newcode1090 ...
4 years, 3 months ago (2016-09-23 21:04:07 UTC) #10
xidachen
lgtm with nits and all error fixed. https://codereview.chromium.org/2362363002/diff/1/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp File third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp (right): https://codereview.chromium.org/2362363002/diff/1/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp#newcode804 third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp:804: { I ...
4 years, 3 months ago (2016-09-24 01:36:34 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2362363002/20001
4 years, 2 months ago (2016-09-26 16:53:18 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/266779)
4 years, 2 months ago (2016-09-26 17:02:43 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2362363002/40001
4 years, 2 months ago (2016-09-26 18:16:38 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/299771)
4 years, 2 months ago (2016-09-26 20:12:05 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2362363002/40001
4 years, 2 months ago (2016-09-26 20:15:32 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/148336)
4 years, 2 months ago (2016-09-26 22:38:35 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2362363002/40001
4 years, 2 months ago (2016-09-28 20:24:28 UTC) #28
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-09-28 21:53:21 UTC) #30
commit-bot: I haz the power
4 years, 2 months ago (2016-09-28 21:54:49 UTC) #32
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/03b1013d9a855aba76fa626a640b08b95146154f
Cr-Commit-Position: refs/heads/master@{#421651}

Powered by Google App Engine
This is Rietveld 408576698