Index: mandoline/ui/aura/surface_binding.cc |
diff --git a/mandoline/ui/aura/surface_binding.cc b/mandoline/ui/aura/surface_binding.cc |
index f610fed0f658132d6d35602d1ccf676d9b91d5c3..43beb2c23496892322b3e12700d897a411271fb6 100644 |
--- a/mandoline/ui/aura/surface_binding.cc |
+++ b/mandoline/ui/aura/surface_binding.cc |
@@ -34,11 +34,13 @@ namespace { |
// appropriate. |
class OutputSurfaceImpl : public cc::OutputSurface { |
public: |
- OutputSurfaceImpl(mojo::View* view, |
- const scoped_refptr<cc::ContextProvider>& context_provider, |
- mojo::Surface* surface, |
- uint32_t id_namespace, |
- uint32_t* next_local_id); |
+ OutputSurfaceImpl( |
+ mojo::View* view, |
+ const scoped_refptr<cc::ContextProvider>& context_provider, |
+ const scoped_refptr<cc::ContextProvider>& worker_context_provider, |
+ mojo::Surface* surface, |
+ uint32_t id_namespace, |
+ uint32_t* next_local_id); |
~OutputSurfaceImpl() override; |
// cc::OutputSurface: |
@@ -58,10 +60,11 @@ class OutputSurfaceImpl : public cc::OutputSurface { |
OutputSurfaceImpl::OutputSurfaceImpl( |
mojo::View* view, |
const scoped_refptr<cc::ContextProvider>& context_provider, |
+ const scoped_refptr<cc::ContextProvider>& worker_context_provider, |
mojo::Surface* surface, |
uint32_t id_namespace, |
uint32_t* next_local_id) |
- : cc::OutputSurface(context_provider), |
+ : cc::OutputSurface(context_provider, worker_context_provider), |
view_(view), |
surface_(surface), |
id_namespace_(id_namespace), |
@@ -172,11 +175,16 @@ SurfaceBinding::PerViewManagerState::CreateOutputSurface(mojo::View* view) { |
// TODO(sky): figure out lifetime here. Do I need to worry about the return |
// value outliving this? |
mojo::CommandBufferPtr cb; |
+ mojo::CommandBufferPtr worker_cb; |
gpu_->CreateOffscreenGLES2Context(GetProxy(&cb)); |
+ gpu_->CreateOffscreenGLES2Context(GetProxy(&worker_cb)); |
scoped_refptr<cc::ContextProvider> context_provider( |
new mojo::ContextProviderMojo(cb.PassInterface().PassHandle())); |
+ scoped_refptr<cc::ContextProvider> worker_context_provider( |
+ new mojo::ContextProviderMojo(worker_cb.PassInterface().PassHandle())); |
return make_scoped_ptr(new OutputSurfaceImpl( |
- view, context_provider, surface_.get(), id_namespace_, &next_local_id_)); |
+ view, context_provider, worker_context_provider, surface_.get(), |
+ id_namespace_, &next_local_id_)); |
} |
SurfaceBinding::PerViewManagerState::PerViewManagerState( |