From 3831ae45b1e856e07e760e0a8630c79ef690f8c1 Mon Sep 17 00:00:00 2001 From: "jamesr@chromium.org" Date: Fri, 20 Dec 2013 01:16:53 +0000 Subject: Use the GL in process bindings directly in cc_unittests This binds cc_unittests to the GL in process command buffer bindings directly instead of relying on the setup in webkit/common/gpu. BUG=181120 Review URL: https://codereview.chromium.org/105303003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242005 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/test/pixel_test.cc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'cc/test/pixel_test.cc') diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc index 78cdd69..713f09e 100644 --- a/cc/test/pixel_test.cc +++ b/cc/test/pixel_test.cc @@ -21,10 +21,9 @@ #include "cc/test/pixel_test_output_surface.h" #include "cc/test/pixel_test_software_output_device.h" #include "cc/test/pixel_test_utils.h" +#include "cc/test/test_in_process_context_provider.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gl/gl_implementation.h" -#include "webkit/common/gpu/context_provider_in_process.h" -#include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" namespace cc { @@ -59,13 +58,12 @@ bool PixelTest::RunPixelTestWithReadbackTarget( base::Unretained(this), run_loop.QuitClosure()))); - scoped_refptr offscreen_contexts; + scoped_refptr offscreen_contexts; switch (provide_offscreen_context) { case NoOffscreenContext: break; case WithOffscreenContext: - offscreen_contexts = - webkit::gpu::ContextProviderInProcess::CreateOffscreen(); + offscreen_contexts = new TestInProcessContextProvider; CHECK(offscreen_contexts->BindToCurrentThread()); break; } @@ -115,17 +113,15 @@ bool PixelTest::PixelsMatchReference(const base::FilePath& ref_file, if (cmd->HasSwitch(switches::kCCRebaselinePixeltests)) return WritePNGFile(*result_bitmap_, test_data_dir.Append(ref_file), true); - return MatchesPNGFile(*result_bitmap_, - test_data_dir.Append(ref_file), - comparator); + return MatchesPNGFile( + *result_bitmap_, test_data_dir.Append(ref_file), comparator); } void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); - using webkit::gpu::ContextProviderInProcess; - output_surface_.reset(new PixelTestOutputSurface( - ContextProviderInProcess::CreateOffscreen())); + output_surface_.reset( + new PixelTestOutputSurface(new TestInProcessContextProvider)); output_surface_->BindToClient(output_surface_client_.get()); resource_provider_ = -- cgit v1.1