Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Issue 2267993002: Expose if we are using swiftshader via WebGraphicsContext3DProvider. (Closed)

Created:
4 years, 4 months ago by danakj
Modified:
4 years, 4 months ago
CC:
chromium-reviews, blink-reviews-platform-graphics_chromium.org, dshwang, rwlbuis, krit, drott+blinkwatch_chromium.org, blink-reviews-html_chromium.org, jam, dglazkov+blink, Rik, darin-cc_chromium.org, blink-reviews, ajuma+watch_chromium.org, blink-reviews-api_chromium.org, mlamouri+watch-content_chromium.org, jbroman, pdr+graphicswatchlist_chromium.org, piman+watch_chromium.org, Stephen Chennney, ajuma+watch-canvas_chromium.org, f(malita), danakj+watch_chromium.org, enne (OOO)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Expose if we are using swiftshader via WebGraphicsContext3DProvider. When we are using swiftshader, we are able to make contexts but the compositor will not use GPU compositing, and WebGL/Canvas should not be producing GL outputs for it. This is visible via the GPUInfo's software_rendering flag. Currently WebGL and Canvas get this info via two different paths, and the compositor makes its decision via a third. They all end up being the same thing (mostly not racey) but we can make this more common by just having them all check |software_rendering|. This has the additional benefits that: 1) We don't need to do a round trip thru the compositor thread to determine if we're doing GPU compositing (no more RendererCapability needed). 2) We don't need a separate method on the Platform API. 3) Canvas2D doesn't have a semi-racey thing where it can check |software_rendering| on one GpuChannelHost, lose it, then make a context on a different GpuChannelHost. Now the capability is explicitly tied to the lifetime of the context, which is what the comment in Platform tried to warn about. 4) Additionally, have DrawingBuffer check lost context and not try to produce frames in this scenario since it may end up producing the wrong mode for the compositor which is already using a new context with a different mode. (Canvas already does this.) This helps us eliminate races between cc/webgl/canvas on making this decision. When the GpuChannelHost is lost, all contexts become lost when the next code tries to create a context. Since we now tie the decisions around which mode to use to the context, and the context is lost when any other part of the system would change its opinion about what mode to use, they should all agree. [email protected], [email protected], [email protected] BUG=606056 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/4dd43951b9efedb9473e65e8132ee5d8976bc860 Cr-Commit-Position: refs/heads/master@{#413837}

Patch Set 1 #

Patch Set 2 : softwarerendering: addmorecomment #

Total comments: 1

Patch Set 3 : softwarerendering: . #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -69 lines) Patch
M content/renderer/renderer_blink_platform_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 1 3 chunks +22 lines, -12 lines 0 comments Download
M content/renderer/webgraphicscontext3d_provider_impl.h View 3 chunks +4 lines, -1 line 0 comments Download
M content/renderer/webgraphicscontext3d_provider_impl.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.h View 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 4 chunks +12 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h View 4 chunks +12 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h View 2 chunks +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp View 1 2 2 chunks +6 lines, -11 lines 1 comment Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h View 1 2 3 chunks +10 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp View 1 2 5 chunks +21 lines, -4 lines 1 comment Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp View 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/test/FakeWebGraphicsContext3DProvider.h View 1 chunk +6 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/Platform.h View 1 chunk +0 lines, -7 lines 0 comments Download
M third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h View 1 chunk +4 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 32 (18 generated)
danakj
4 years, 4 months ago (2016-08-22 21:49:21 UTC) #1
danakj
+pdr for public/ again
4 years, 4 months ago (2016-08-22 21:49:52 UTC) #3
danakj
kbr: please review webgl bits junov: please review canvas bits piman: please review content/ and ...
4 years, 4 months ago (2016-08-22 21:54:05 UTC) #4
danakj
(I'll remove the useSharedMemory parameter from PrepareTextureMailbox in a followup CL)
4 years, 4 months ago (2016-08-22 21:54:32 UTC) #5
Ken Russell (switch to Gerrit)
Very nice. LGTM
4 years, 4 months ago (2016-08-22 22:03:16 UTC) #6
pdr.
On 2016/08/22 at 21:49:52, danakj wrote: > +pdr for public/ again LGTM for public/
4 years, 4 months ago (2016-08-22 22:05:41 UTC) #7
piman
lgtm https://codereview.chromium.org/2267993002/diff/20001/content/renderer/renderer_blink_platform_impl.cc File content/renderer/renderer_blink_platform_impl.cc (right): https://codereview.chromium.org/2267993002/diff/20001/content/renderer/renderer_blink_platform_impl.cc#newcode1133 content/renderer/renderer_blink_platform_impl.cc:1133: // |is_software_rendering| will never be wrong. Alternatively, we ...
4 years, 4 months ago (2016-08-22 22:39:51 UTC) #8
danakj
2 lil changes in the last patchset. https://codereview.chromium.org/2267993002/diff/60001/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp File third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp (right): https://codereview.chromium.org/2267993002/diff/60001/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp#newcode795 third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp:795: // If ...
4 years, 4 months ago (2016-08-22 22:57:44 UTC) #11
Ken Russell (switch to Gerrit)
Thanks for tracking down the transferToStaticBitmapImage issue. Still LGTM.
4 years, 4 months ago (2016-08-22 23:25:03 UTC) #12
danakj
junov: I'll wait for your review of the canvas stuff, thanks :)
4 years, 4 months ago (2016-08-23 01:02:30 UTC) #15
Justin Novosad
On 2016/08/23 01:02:30, danakj wrote: > junov: I'll wait for your review of the canvas ...
4 years, 4 months ago (2016-08-23 21:08:04 UTC) #23
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/2267993002/60001
4 years, 4 months ago (2016-08-23 21:12:47 UTC) #29
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years, 4 months ago (2016-08-23 21:19:01 UTC) #30
commit-bot: I haz the power
4 years, 4 months ago (2016-08-23 21:20:45 UTC) #32
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/4dd43951b9efedb9473e65e8132ee5d8976bc860
Cr-Commit-Position: refs/heads/master@{#413837}

Powered by Google App Engine
This is Rietveld 408576698