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

Issue 12673002: pepper: Use the RenderThread's shared context as the parent context. (Closed)

Created:
7 years, 9 months ago by danakj
Modified:
7 years, 9 months ago
Reviewers:
jbauman, piman
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, backer, jamesr
Visibility:
Public.

Description

pepper: Use the RenderThread's shared context as the parent context. Remove the PepperParentContextProvider interface entirely. Have the pepper PlatformContext3DImpl go directly to RenderThreadImpl and get the offscreen shared context, and create its texture with that context and make it the parent of the PlatformContext3DImpl context3d. Remove the SetParentContext() method from the PlatformContext3DImpl and the plugin delegate, and the fullscreen widget. Instead, when the plugin delegate or fullscreen widget become active, in ReparentContext() they have the PlatformContext3DImpl require access to the offscreen shared context and create the parent texture id with it, if needed. The fullscreen widget context management needs to be adjusted. Previously PlatformContext3DImpl would call back into the fullscreen widget which would create the fullscreen widget's context. But we have removed that circular trip. Now in RenderWidgetFullscreenPepper::CheckCompositing() if compositing mode is being used, we create the fullscreen context3d. We also recreate it if the old context was lost. When leaving compositing mode, the fullscreen widget's context is destroyed. The fullscreen widget's context is now made to share resources so that it can access the texture created by the RenderThread's context. This fixes the known issue where fullscreen remains black after a context loss. R=piman BUG=181052 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=187109

Patch Set 1 : #

Total comments: 9

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Patch Set 4 : #

Total comments: 3

Patch Set 5 : null context3d in swiftshader #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -164 lines) Patch
M content/content_renderer.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
D content/renderer/pepper/pepper_parent_context_provider.h View 1 chunk +0 lines, -30 lines 0 comments Download
D content/renderer/pepper/pepper_parent_context_provider.cc View 1 chunk +0 lines, -15 lines 0 comments Download
M content/renderer/pepper/pepper_platform_context_3d_impl.h View 1 2 3 2 chunks +5 lines, -9 lines 0 comments Download
M content/renderer/pepper/pepper_platform_context_3d_impl.cc View 1 2 3 5 chunks +35 lines, -53 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.h View 1 2 3 3 chunks +0 lines, -6 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.cc View 1 2 3 3 chunks +3 lines, -17 lines 0 comments Download
M content/renderer/render_widget_fullscreen_pepper.h View 1 2 3 3 chunks +0 lines, -6 lines 0 comments Download
M content/renderer/render_widget_fullscreen_pepper.cc View 1 2 3 4 5 chunks +33 lines, -26 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
danakj
7 years, 9 months ago (2013-03-08 04:17:53 UTC) #1
piman
https://codereview.chromium.org/12673002/diff/6015/content/renderer/pepper/pepper_platform_context_3d_impl.cc File content/renderer/pepper/pepper_platform_context_3d_impl.cc (right): https://codereview.chromium.org/12673002/diff/6015/content/renderer/pepper/pepper_platform_context_3d_impl.cc#newcode127 content/renderer/pepper/pepper_platform_context_3d_impl.cc:127: !parent_context_provider_->BindToCurrentThread()) { Is it ok to do those every ...
7 years, 9 months ago (2013-03-08 04:43:16 UTC) #2
danakj
PTAL https://codereview.chromium.org/12673002/diff/6015/content/renderer/pepper/pepper_platform_context_3d_impl.cc File content/renderer/pepper/pepper_platform_context_3d_impl.cc (right): https://codereview.chromium.org/12673002/diff/6015/content/renderer/pepper/pepper_platform_context_3d_impl.cc#newcode127 content/renderer/pepper/pepper_platform_context_3d_impl.cc:127: !parent_context_provider_->BindToCurrentThread()) { On 2013/03/08 04:43:16, piman wrote: > ...
7 years, 9 months ago (2013-03-08 18:13:34 UTC) #3
piman
+jbauman https://codereview.chromium.org/12673002/diff/6015/content/renderer/pepper/pepper_platform_context_3d_impl.cc File content/renderer/pepper/pepper_platform_context_3d_impl.cc (right): https://codereview.chromium.org/12673002/diff/6015/content/renderer/pepper/pepper_platform_context_3d_impl.cc#newcode127 content/renderer/pepper/pepper_platform_context_3d_impl.cc:127: !parent_context_provider_->BindToCurrentThread()) { On 2013/03/08 18:13:34, danakj wrote: > ...
7 years, 9 months ago (2013-03-08 18:27:08 UTC) #4
danakj
https://codereview.chromium.org/12673002/diff/6015/content/renderer/pepper/pepper_platform_context_3d_impl.cc File content/renderer/pepper/pepper_platform_context_3d_impl.cc (right): https://codereview.chromium.org/12673002/diff/6015/content/renderer/pepper/pepper_platform_context_3d_impl.cc#newcode127 content/renderer/pepper/pepper_platform_context_3d_impl.cc:127: !parent_context_provider_->BindToCurrentThread()) { On 2013/03/08 18:27:08, piman wrote: > On ...
7 years, 9 months ago (2013-03-08 18:40:28 UTC) #5
danakj
https://codereview.chromium.org/12673002/diff/17001/content/renderer/render_widget_fullscreen_pepper.cc File content/renderer/render_widget_fullscreen_pepper.cc (right): https://codereview.chromium.org/12673002/diff/17001/content/renderer/render_widget_fullscreen_pepper.cc#newcode557 content/renderer/render_widget_fullscreen_pepper.cc:557: return; On 2013/03/08 18:27:08, piman wrote: > I just ...
7 years, 9 months ago (2013-03-08 18:58:13 UTC) #6
danakj
This seems to behave the same as before this CL wrt fullscreen and enabling compositing ...
7 years, 9 months ago (2013-03-08 21:00:33 UTC) #7
danakj
Ok this should preserve the same semantics as before with respect to reparenting into fullscreen ...
7 years, 9 months ago (2013-03-08 22:09:31 UTC) #8
piman
https://codereview.chromium.org/12673002/diff/35002/content/renderer/render_widget_fullscreen_pepper.cc File content/renderer/render_widget_fullscreen_pepper.cc (right): https://codereview.chromium.org/12673002/diff/35002/content/renderer/render_widget_fullscreen_pepper.cc#newcode453 content/renderer/render_widget_fullscreen_pepper.cc:453: return new PlatformContext3DImpl; we probably want to return NULL ...
7 years, 9 months ago (2013-03-08 22:37:52 UTC) #9
danakj
https://codereview.chromium.org/12673002/diff/35002/content/renderer/render_widget_fullscreen_pepper.cc File content/renderer/render_widget_fullscreen_pepper.cc (right): https://codereview.chromium.org/12673002/diff/35002/content/renderer/render_widget_fullscreen_pepper.cc#newcode453 content/renderer/render_widget_fullscreen_pepper.cc:453: return new PlatformContext3DImpl; On 2013/03/08 22:37:52, piman wrote: > ...
7 years, 9 months ago (2013-03-08 22:40:45 UTC) #10
piman
https://codereview.chromium.org/12673002/diff/35002/content/renderer/render_widget_fullscreen_pepper.cc File content/renderer/render_widget_fullscreen_pepper.cc (right): https://codereview.chromium.org/12673002/diff/35002/content/renderer/render_widget_fullscreen_pepper.cc#newcode453 content/renderer/render_widget_fullscreen_pepper.cc:453: return new PlatformContext3DImpl; On 2013/03/08 22:40:46, danakj wrote: > ...
7 years, 9 months ago (2013-03-08 22:44:08 UTC) #11
piman
On 2013/03/08 22:44:08, piman wrote: > https://codereview.chromium.org/12673002/diff/35002/content/renderer/render_widget_fullscreen_pepper.cc > File content/renderer/render_widget_fullscreen_pepper.cc (right): > > https://codereview.chromium.org/12673002/diff/35002/content/renderer/render_widget_fullscreen_pepper.cc#newcode453 > ...
7 years, 9 months ago (2013-03-08 22:45:49 UTC) #12
jbauman
On 2013/03/08 22:45:49, piman wrote: > On 2013/03/08 22:44:08, piman wrote: > > > https://codereview.chromium.org/12673002/diff/35002/content/renderer/render_widget_fullscreen_pepper.cc ...
7 years, 9 months ago (2013-03-08 22:47:05 UTC) #13
danakj
I see, ok done!
7 years, 9 months ago (2013-03-08 22:48:29 UTC) #14
piman
LGTM - crossing fingers. I hope this is going to fix the bug and not ...
7 years, 9 months ago (2013-03-08 22:56:28 UTC) #15
danakj
On 2013/03/08 22:56:28, piman wrote: > LGTM - crossing fingers. I hope this is going ...
7 years, 9 months ago (2013-03-08 22:57:14 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/12673002/29015
7 years, 9 months ago (2013-03-08 22:57:50 UTC) #17
commit-bot: I haz the power
7 years, 9 months ago (2013-03-09 01:54:13 UTC) #18
Message was sent while issue was closed.
Change committed as 187109

Powered by Google App Engine
This is Rietveld 408576698