OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/test/pixel_test.h" | 5 #include "cc/test/pixel_test.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "cc/output/compositor_frame_metadata.h" | 9 #include "cc/output/compositor_frame_metadata.h" |
10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 return MatchesPNGFile(*result_bitmap_, | 161 return MatchesPNGFile(*result_bitmap_, |
162 test_data_dir.Append(ref_file), | 162 test_data_dir.Append(ref_file), |
163 comparator); | 163 comparator); |
164 } | 164 } |
165 | 165 |
166 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { | 166 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { |
167 CHECK(fake_client_); | 167 CHECK(fake_client_); |
168 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); | 168 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); |
169 | 169 |
170 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; | 170 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; |
171 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d( | 171 scoped_ptr<WebKit::WebGraphicsContext3D> context3d( |
172 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( | 172 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( |
173 WebKit::WebGraphicsContext3D::Attributes())); | 173 WebKit::WebGraphicsContext3D::Attributes())); |
174 output_surface_.reset(new PixelTestOutputSurface( | 174 output_surface_.reset(new PixelTestOutputSurface( |
175 context3d.PassAs<WebKit::WebGraphicsContext3D>())); | 175 context3d.PassAs<WebKit::WebGraphicsContext3D>())); |
176 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); | 176 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); |
177 renderer_ = GLRenderer::Create(fake_client_.get(), | 177 renderer_ = GLRenderer::Create(fake_client_.get(), |
178 output_surface_.get(), | 178 output_surface_.get(), |
179 resource_provider_.get(), | 179 resource_provider_.get(), |
180 0, | 180 0, |
181 use_skia_gpu_backend).PassAs<DirectRenderer>(); | 181 use_skia_gpu_backend).PassAs<DirectRenderer>(); |
(...skipping 22 matching lines...) Expand all Loading... |
204 scoped_ptr<SoftwareOutputDevice> device(new PixelTestSoftwareOutputDevice()); | 204 scoped_ptr<SoftwareOutputDevice> device(new PixelTestSoftwareOutputDevice()); |
205 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); | 205 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); |
206 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); | 206 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); |
207 renderer_ = SoftwareRenderer::Create( | 207 renderer_ = SoftwareRenderer::Create( |
208 fake_client_.get(), | 208 fake_client_.get(), |
209 output_surface_.get(), | 209 output_surface_.get(), |
210 resource_provider_.get()).PassAs<DirectRenderer>(); | 210 resource_provider_.get()).PassAs<DirectRenderer>(); |
211 } | 211 } |
212 | 212 |
213 } // namespace cc | 213 } // namespace cc |
OLD | NEW |