summaryrefslogtreecommitdiffstats
path: root/cc/test/pixel_test.cc
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-20 01:16:53 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-20 01:16:53 +0000
commit3831ae45b1e856e07e760e0a8630c79ef690f8c1 (patch)
tree6701b5e1f78af43872f500c967208b77258c5804 /cc/test/pixel_test.cc
parent108949ca10059379fa04f52528ce300efe78ee20 (diff)
downloadchromium_src-3831ae45b1e856e07e760e0a8630c79ef690f8c1.zip
chromium_src-3831ae45b1e856e07e760e0a8630c79ef690f8c1.tar.gz
chromium_src-3831ae45b1e856e07e760e0a8630c79ef690f8c1.tar.bz2
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
Diffstat (limited to 'cc/test/pixel_test.cc')
-rw-r--r--cc/test/pixel_test.cc18
1 files changed, 7 insertions, 11 deletions
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<webkit::gpu::ContextProviderInProcess> offscreen_contexts;
+ scoped_refptr<ContextProvider> 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_ =