| Index: cc/test/fake_output_surface.h
|
| diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
|
| index 0374a7d447dd82a752603582338e9ecba0b5fa23..a4cacf97ed903b8d097e4750a2238c8c4a56cf8c 100644
|
| --- a/cc/test/fake_output_surface.h
|
| +++ b/cc/test/fake_output_surface.h
|
| @@ -26,29 +26,33 @@ class FakeOutputSurface : public OutputSurface {
|
| ~FakeOutputSurface() override;
|
|
|
| static std::unique_ptr<FakeOutputSurface> Create3d() {
|
| - return base::WrapUnique(
|
| - new FakeOutputSurface(TestContextProvider::Create(),
|
| - TestContextProvider::CreateWorker(), false));
|
| + return base::WrapUnique(new FakeOutputSurface(
|
| + base::MakeUnique<TestContextProvider::DeferredCreate>(),
|
| + TestContextProvider::Create(), false));
|
| }
|
|
|
| static std::unique_ptr<FakeOutputSurface> Create3d(
|
| - scoped_refptr<ContextProvider> context_provider) {
|
| - return base::WrapUnique(new FakeOutputSurface(
|
| - context_provider, TestContextProvider::CreateWorker(), false));
|
| + std::unique_ptr<ContextProvider::DeferredCreate>
|
| + context_provider_create) {
|
| + return base::WrapUnique(
|
| + new FakeOutputSurface(std::move(context_provider_create),
|
| + TestContextProvider::Create(), false));
|
| }
|
|
|
| static std::unique_ptr<FakeOutputSurface> Create3d(
|
| - scoped_refptr<ContextProvider> context_provider,
|
| + std::unique_ptr<ContextProvider::DeferredCreate> context_provider_create,
|
| scoped_refptr<ContextProvider> worker_context_provider) {
|
| - return base::WrapUnique(new FakeOutputSurface(
|
| - context_provider, worker_context_provider, false));
|
| + return base::WrapUnique(
|
| + new FakeOutputSurface(std::move(context_provider_create),
|
| + std::move(worker_context_provider), false));
|
| }
|
|
|
| static std::unique_ptr<FakeOutputSurface> Create3d(
|
| std::unique_ptr<TestWebGraphicsContext3D> context) {
|
| - return base::WrapUnique(
|
| - new FakeOutputSurface(TestContextProvider::Create(std::move(context)),
|
| - TestContextProvider::CreateWorker(), false));
|
| + return base::WrapUnique(new FakeOutputSurface(
|
| + base::MakeUnique<TestContextProvider::DeferredCreate>(
|
| + std::move(context)),
|
| + TestContextProvider::Create(), false));
|
| }
|
|
|
| static std::unique_ptr<FakeOutputSurface> CreateSoftware(
|
| @@ -60,27 +64,30 @@ class FakeOutputSurface : public OutputSurface {
|
| static std::unique_ptr<FakeOutputSurface>
|
| Create3dWithResourcelessSoftwareSupport() {
|
| return base::WrapUnique(new FakeOutputSurface(
|
| - TestContextProvider::Create(),
|
| + base::MakeUnique<TestContextProvider::DeferredCreate>(),
|
| base::WrapUnique(new SoftwareOutputDevice), false));
|
| }
|
|
|
| static std::unique_ptr<FakeOutputSurface> CreateDelegating3d() {
|
| - return base::WrapUnique(
|
| - new FakeOutputSurface(TestContextProvider::Create(),
|
| - TestContextProvider::CreateWorker(), true));
|
| + return base::WrapUnique(new FakeOutputSurface(
|
| + base::MakeUnique<TestContextProvider::DeferredCreate>(),
|
| + TestContextProvider::Create(), true));
|
| }
|
|
|
| static std::unique_ptr<FakeOutputSurface> CreateDelegating3d(
|
| - scoped_refptr<TestContextProvider> context_provider) {
|
| - return base::WrapUnique(new FakeOutputSurface(
|
| - context_provider, TestContextProvider::CreateWorker(), true));
|
| + std::unique_ptr<ContextProvider::DeferredCreate>
|
| + context_provider_create) {
|
| + return base::WrapUnique(
|
| + new FakeOutputSurface(std::move(context_provider_create),
|
| + TestContextProvider::Create(), true));
|
| }
|
|
|
| static std::unique_ptr<FakeOutputSurface> CreateDelegating3d(
|
| std::unique_ptr<TestWebGraphicsContext3D> context) {
|
| - return base::WrapUnique(
|
| - new FakeOutputSurface(TestContextProvider::Create(std::move(context)),
|
| - TestContextProvider::CreateWorker(), true));
|
| + return base::WrapUnique(new FakeOutputSurface(
|
| + base::MakeUnique<TestContextProvider::DeferredCreate>(
|
| + std::move(context)),
|
| + TestContextProvider::Create(), true));
|
| }
|
|
|
| static std::unique_ptr<FakeOutputSurface> CreateDelegatingSoftware(
|
| @@ -99,7 +106,9 @@ class FakeOutputSurface : public OutputSurface {
|
| static std::unique_ptr<FakeOutputSurface> CreateOffscreen(
|
| std::unique_ptr<TestWebGraphicsContext3D> context) {
|
| std::unique_ptr<FakeOutputSurface> surface(new FakeOutputSurface(
|
| - TestContextProvider::Create(std::move(context)), false));
|
| + base::MakeUnique<TestContextProvider::DeferredCreate>(
|
| + std::move(context)),
|
| + false));
|
| surface->capabilities_.uses_default_gl_framebuffer = false;
|
| return surface;
|
| }
|
| @@ -153,19 +162,21 @@ class FakeOutputSurface : public OutputSurface {
|
|
|
| protected:
|
| FakeOutputSurface(
|
| - scoped_refptr<ContextProvider> context_provider,
|
| + std::unique_ptr<ContextProvider::DeferredCreate> context_provider_create,
|
| bool delegated_rendering);
|
|
|
| - FakeOutputSurface(scoped_refptr<ContextProvider> context_provider,
|
| - scoped_refptr<ContextProvider> worker_context_provider,
|
| - bool delegated_rendering);
|
| + FakeOutputSurface(
|
| + std::unique_ptr<ContextProvider::DeferredCreate> context_provider_create,
|
| + scoped_refptr<ContextProvider> worker_context_provider,
|
| + bool delegated_rendering);
|
|
|
| FakeOutputSurface(std::unique_ptr<SoftwareOutputDevice> software_device,
|
| bool delegated_rendering);
|
|
|
| - FakeOutputSurface(scoped_refptr<ContextProvider> context_provider,
|
| - std::unique_ptr<SoftwareOutputDevice> software_device,
|
| - bool delegated_rendering);
|
| + FakeOutputSurface(
|
| + std::unique_ptr<ContextProvider::DeferredCreate> context_provider_create,
|
| + std::unique_ptr<SoftwareOutputDevice> software_device,
|
| + bool delegated_rendering);
|
|
|
| OutputSurfaceClient* client_;
|
| CompositorFrame last_sent_frame_;
|
|
|