| Index: cc/output/output_surface.cc
|
| diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
|
| index b65887e960262262c0f514492f56a49ac0a0e7c3..e5c0713d658277f6d89d0e226f8d25faddd20482 100644
|
| --- a/cc/output/output_surface.cc
|
| +++ b/cc/output/output_surface.cc
|
| @@ -21,6 +21,18 @@ OutputSurface::OutputSurface(
|
| const scoped_refptr<ContextProvider>& context_provider)
|
| : client_(NULL),
|
| context_provider_(context_provider),
|
| + worker_context_provider_(NULL),
|
| + device_scale_factor_(-1),
|
| + external_stencil_test_enabled_(false),
|
| + weak_ptr_factory_(this) {
|
| +}
|
| +
|
| +OutputSurface::OutputSurface(
|
| + const scoped_refptr<ContextProvider>& context_provider,
|
| + const scoped_refptr<ContextProvider>& worker_context_provider)
|
| + : client_(NULL),
|
| + context_provider_(context_provider),
|
| + worker_context_provider_(worker_context_provider),
|
| device_scale_factor_(-1),
|
| external_stencil_test_enabled_(false),
|
| weak_ptr_factory_(this) {
|
| @@ -36,9 +48,11 @@ OutputSurface::OutputSurface(scoped_ptr<SoftwareOutputDevice> software_device)
|
|
|
| OutputSurface::OutputSurface(
|
| const scoped_refptr<ContextProvider>& context_provider,
|
| + const scoped_refptr<ContextProvider>& worker_context_provider,
|
| scoped_ptr<SoftwareOutputDevice> software_device)
|
| : client_(NULL),
|
| context_provider_(context_provider),
|
| + worker_context_provider_(worker_context_provider),
|
| software_device_(software_device.Pass()),
|
| device_scale_factor_(-1),
|
| external_stencil_test_enabled_(false),
|
| @@ -105,8 +119,14 @@ bool OutputSurface::BindToClient(OutputSurfaceClient* client) {
|
|
|
| if (context_provider_.get()) {
|
| success = context_provider_->BindToCurrentThread();
|
| - if (success)
|
| + if (success) {
|
| SetUpContext3d();
|
| + }
|
| + }
|
| +
|
| + if (worker_context_provider_.get()) {
|
| + success = worker_context_provider_->BindToCurrentThread();
|
| + // TODO(vmiura): Callbacks for worker context.
|
| }
|
|
|
| if (!success)
|
|
|