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

Issue 51653008: Remove WGC3D::isContextLost references from cc (Closed)

Created:
7 years, 1 month ago by jamesr
Modified:
7 years, 1 month ago
Reviewers:
piman
CC:
chromium-reviews, joi+watch-content_chromium.org, Ian Vollick, jam, apatrick_chromium, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, cc-bugs_chromium.org, danakj+watch_chromium.org
Visibility:
Public.

Description

Remove WGC3D::isContextLost references from cc The notion of whether a context is lost is a property of both the gpu:: context itself and the system providing it. For instance, the content context provider checks if there is an error in the context or if the IPC channel backing the command buffer is down. Thus, asking if a context is lost really should go through the ContextProvider. This patch routes all lost context checks from cc through the ContextProvider. Unfortunately, this required reworking the program initialization code considerably due to the way some DCHECKs were written. The new model is that the program binding itself is inert upon construction and all initialization is done in the Initialize() call. This call is still made eagerly for some expected-to-be-common programs and lazily for the rest. This patch moves when the linkProgram() call is issued slightly for the eagerly compiled programs, but it shouldn't make any difference in practice. This patch also revamps TextureLayerClient to hide the backing context since cc only makes two calls (check for loss and insert rate limiting token) on the client's context. R=piman BUG=181120 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=233325

Patch Set 1 #

Patch Set 2 : rebased #

Total comments: 7

Patch Set 3 : address feedback, require PrepareTexture() to return 0 on lost context (which it already does) #

Patch Set 4 : Add explicit lost check to GpuProcessTransportFactory #

Patch Set 5 : typo in gpu_process_transport_factory #

Patch Set 6 : fix android build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+398 lines, -678 lines) Patch
M cc/layers/texture_layer.cc View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M cc/layers/texture_layer_client.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M cc/layers/texture_layer_unittest.cc View 1 2 18 chunks +40 lines, -78 lines 0 comments Download
M cc/output/context_provider.h View 2 chunks +3 lines, -1 line 0 comments Download
M cc/output/context_provider.cc View 1 chunk +1 line, -2 lines 0 comments Download
M cc/output/delegating_renderer.cc View 1 chunk +1 line, -2 lines 0 comments Download
M cc/output/gl_renderer.h View 1 2 1 chunk +52 lines, -59 lines 0 comments Download
M cc/output/gl_renderer.cc View 10 chunks +207 lines, -324 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 2 3 4 4 chunks +21 lines, -30 lines 0 comments Download
M cc/output/program_binding.h View 4 chunks +23 lines, -23 lines 0 comments Download
M cc/output/program_binding.cc View 3 chunks +13 lines, -22 lines 0 comments Download
M cc/output/shader.h View 28 chunks +1 line, -29 lines 0 comments Download
M cc/output/shader.cc View 55 chunks +2 lines, -62 lines 0 comments Download
M cc/test/fake_web_graphics_context_3d.h View 1 chunk +0 lines, -1 line 0 comments Download
M cc/test/fake_web_graphics_context_3d.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M cc/test/test_context_provider.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/test_context_provider.cc View 1 2 3 chunks +11 lines, -2 lines 0 comments Download
M cc/test/test_web_graphics_context_3d.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M cc/test/test_web_graphics_context_3d.cc View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/aura/gpu_process_transport_factory.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.cc View 2 chunks +8 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M ui/compositor/layer.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M ui/compositor/layer.cc View 1 2 2 chunks +1 line, -7 lines 0 comments Download
M webkit/common/gpu/context_provider_in_process.h View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/common/gpu/context_provider_in_process.cc View 2 chunks +8 lines, -1 line 0 comments Download
M webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M webkit/renderer/compositor_bindings/web_external_texture_layer_impl.cc View 1 2 2 chunks +1 line, -5 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
jamesr
This really snowballed from what I was expecting, but we get some nice wins too ...
7 years, 1 month ago (2013-11-01 22:32:56 UTC) #1
piman
Uncomfortably excited about this. A couple of nits, but the main thing is re: the ...
7 years, 1 month ago (2013-11-01 23:15:34 UTC) #2
jamesr
On 2013/11/01 23:15:34, piman wrote: > https://codereview.chromium.org/51653008/diff/50001/cc/trees/layer_tree_host.cc#newcode1119 > cc/trees/layer_tree_host.cc:1119: RateLimiterMap::iterator it = > rate_limiters_.find(client); > ...
7 years, 1 month ago (2013-11-02 00:19:30 UTC) #3
jamesr
Cool! This patch is now on top of https://codereview.chromium.org/53153006/ and is even simpler - there's ...
7 years, 1 month ago (2013-11-02 00:44:28 UTC) #4
piman
If we want to be consistent with the previous behavior, OwnedTexture::PrepareTexture in content/browser/aura/gpu_process_transport_factory.cc needs to ...
7 years, 1 month ago (2013-11-02 01:21:44 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/51653008/580001
7 years, 1 month ago (2013-11-05 16:12:26 UTC) #6
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 1 month ago (2013-11-05 16:58:52 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/51653008/650003
7 years, 1 month ago (2013-11-05 19:41:25 UTC) #8
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 1 month ago (2013-11-05 20:32:26 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/51653008/1070001
7 years, 1 month ago (2013-11-06 00:41:48 UTC) #10
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=94419
7 years, 1 month ago (2013-11-06 04:44:15 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/51653008/1070001
7 years, 1 month ago (2013-11-06 04:53:16 UTC) #12
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=94633
7 years, 1 month ago (2013-11-06 08:49:37 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/51653008/1070001
7 years, 1 month ago (2013-11-06 09:19:57 UTC) #14
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=94801
7 years, 1 month ago (2013-11-06 13:48:36 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/51653008/1070001
7 years, 1 month ago (2013-11-06 16:55:09 UTC) #16
commit-bot: I haz the power
7 years, 1 month ago (2013-11-06 19:45:00 UTC) #17
Message was sent while issue was closed.
Change committed as 233325

Powered by Google App Engine
This is Rietveld 408576698