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

Issue 9655017: Implement WebKitPlatformSupport::canAccelerate2dCanvas (Closed)

Created:
8 years, 9 months ago by jamesr
Modified:
8 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, apatrick_chromium, Stephen White, Ken Russell (switch to Gerrit), jbauman
Visibility:
Public.

Description

Implement WebKitPlatformSupport::canAccelerate2dCanvas We do not want to use the accelerated 2d canvas path if we can lose a context "too easily" - for example due to the screensaver turning on - or if we're using a software rendering backend for GL contexts (swiftshader). The way these conditions are currently checked for are awkard and racy. This adds an explicit check that WebKit calls prior to instantiating an accelerated context for canvas. This does two things: 1.) Attempt to spin up the GpuChannelHost. If we can't do this, then we definitely don't need to bother. Note that if the GPU process crashes this will establish a connection to the new GPU process. 2.) Query the can_lose_context and software_rendering bits from the new channel. These are both properties of the GPU process, not of individual contexts, so we don't need to have a particular context ready in order to do this. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=126558

Patch Set 1 #

Patch Set 2 : fix clang warning about inline virtual function body #

Total comments: 3

Patch Set 3 : move canAccelerate.. call next to createOffscreenGraphicsContext3D call #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -2 lines) Patch
M content/browser/gpu/gpu_data_manager_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/common/gpu/gpu_messages.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/common/gpu/gpu_process_launch_causes.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/gpu/gpu_info_collector_win.cc View 1 chunk +3 lines, -1 line 0 comments Download
M content/public/common/gpu_info.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/gpu_info.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.cc View 1 2 2 chunks +15 lines, -0 lines 0 comments Download
M webkit/support/test_webkit_platform_support.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M webkit/support/test_webkit_platform_support.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
jamesr
The goal here is to replace the canRecoverFromContextLoss attribute currently used for canvas 2d contexts ...
8 years, 9 months ago (2012-03-09 02:43:58 UTC) #1
jamesr
WebKit side here: https://bugs.webkit.org/show_bug.cgi?id=80667 I'm not totally wedded to the name or the details of ...
8 years, 9 months ago (2012-03-09 02:45:17 UTC) #2
apatrick_chromium
I think the GPUInfo addition will work. LGTM and thanks for the cleanup. You'll need ...
8 years, 9 months ago (2012-03-09 19:03:23 UTC) #3
jamesr
https://chromiumcodereview.appspot.com/9655017/diff/6001/content/common/gpu/gpu_process_launch_causes.h File content/common/gpu/gpu_process_launch_causes.h (right): https://chromiumcodereview.appspot.com/9655017/diff/6001/content/common/gpu/gpu_process_launch_causes.h#newcode12 content/common/gpu/gpu_process_launch_causes.h:12: // tools/histograms/histograms.xml. On 2012/03/09 19:03:23, apatrick_chromium wrote: > You ...
8 years, 9 months ago (2012-03-09 19:08:20 UTC) #4
jamesr
John - can you OWNERS review the change to content/public/ ? Darin - can you ...
8 years, 9 months ago (2012-03-09 21:30:46 UTC) #5
jamesr
8 years, 9 months ago (2012-03-10 18:50:45 UTC) #6
jam
lgtm
8 years, 9 months ago (2012-03-11 02:13:40 UTC) #7
darin (slow to review)
LGTM for src/webkit https://chromiumcodereview.appspot.com/9655017/diff/6001/webkit/support/test_webkit_platform_support.h File webkit/support/test_webkit_platform_support.h (right): https://chromiumcodereview.appspot.com/9655017/diff/6001/webkit/support/test_webkit_platform_support.h#newcode127 webkit/support/test_webkit_platform_support.h:127: virtual bool canAccelerate2dCanvas(); nit: put this ...
8 years, 9 months ago (2012-03-13 19:34:36 UTC) #8
jamesr
> > tools/histograms/histograms.xml. > You saw this right? Sent https://chromereviews.googleplex.com/4126021
8 years, 9 months ago (2012-03-13 20:26:40 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/9655017/14001
8 years, 9 months ago (2012-03-13 21:09:40 UTC) #10
commit-bot: I haz the power
Try job failure for 9655017-14001 (previous was lost) (retry) on win_rel for steps "ui_tests, browser_tests". ...
8 years, 9 months ago (2012-03-14 00:11:01 UTC) #11
commit-bot: I haz the power
8 years, 9 months ago (2012-03-14 00:45:54 UTC) #12

Powered by Google App Engine
This is Rietveld 408576698