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

Unified Diff: content/browser/android/in_process/synchronous_compositor_factory_impl.cc

Issue 1064263002: android: Pass cc::ContextProvider to VideoContextProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/in_process/synchronous_compositor_factory_impl.cc
diff --git a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
index 470743a547ca066e1f434035ec6e4df9038b3b64..342134fbdf270e8bea0f9ee1e4913ad65aac4236 100644
--- a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
+++ b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
@@ -83,11 +83,10 @@ class SynchronousCompositorFactoryImpl::VideoContextProvider
: public StreamTextureFactorySynchronousImpl::ContextProvider {
public:
VideoContextProvider(
+ scoped_refptr<cc::ContextProvider> context_provider,
scoped_ptr<gpu::GLInProcessContext> gl_in_process_context)
- : gl_in_process_context_(gl_in_process_context.get()) {
- context_provider_ = webkit::gpu::ContextProviderInProcess::Create(
- WrapContext(gl_in_process_context.Pass(), GetDefaultAttribs()),
- "Video-Offscreen-main-thread");
+ : context_provider_(context_provider),
+ gl_in_process_context_(gl_in_process_context.get()) {
context_provider_->BindToCurrentThread();
}
@@ -262,9 +261,14 @@ SynchronousCompositorFactoryImpl::TryCreateStreamTextureFactory() {
attributes.shareResources = false;
// This needs to run in on-screen |service_| context due to SurfaceTexture
// limitations.
- video_context_provider_ = new VideoContextProvider(CreateContextHolder(
- attributes, service_, gpu::GLInProcessContextSharedMemoryLimits(),
- false));
+ scoped_ptr<gpu::GLInProcessContext> context =
+ CreateContextHolder(attributes, service_,
+ gpu::GLInProcessContextSharedMemoryLimits(), false);
+ video_context_provider_ = new VideoContextProvider(
+ webkit::gpu::ContextProviderInProcess::Create(
+ WrapContext(context.Pass(), GetDefaultAttribs()),
+ "Video-Offscreen-main-thread"),
+ context.Pass());
tfarina 2015/04/07 23:16:27 This second Pass() isn't really right, is it? Is t
boliu 2015/04/08 03:26:08 Right, scoped_ptr can't be passed twice. The secon
tfarina 2015/04/08 19:37:20 Done.
}
return video_context_provider_;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698