| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 return MatchesPNGFile(*result_bitmap_, | 135 return MatchesPNGFile(*result_bitmap_, |
| 136 test_data_dir.Append(ref_file), | 136 test_data_dir.Append(ref_file), |
| 137 comparator); | 137 comparator); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { | 140 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { |
| 141 CHECK(fake_client_); | 141 CHECK(fake_client_); |
| 142 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); | 142 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); |
| 143 | 143 |
| 144 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; | 144 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; |
| 145 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d( | 145 scoped_ptr<WebKit::WebGraphicsContext3D> context3d( |
| 146 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( | 146 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( |
| 147 WebKit::WebGraphicsContext3D::Attributes())); | 147 WebKit::WebGraphicsContext3D::Attributes())); |
| 148 output_surface_.reset(new PixelTestOutputSurface( | 148 output_surface_.reset(new PixelTestOutputSurface( |
| 149 context3d.PassAs<WebKit::WebGraphicsContext3D>())); | 149 context3d.PassAs<WebKit::WebGraphicsContext3D>())); |
| 150 output_surface_->BindToClient(fake_client_.get()); | 150 output_surface_->BindToClient(fake_client_.get()); |
| 151 | 151 |
| 152 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); | 152 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); |
| 153 renderer_ = GLRenderer::Create(fake_client_.get(), | 153 renderer_ = GLRenderer::Create(fake_client_.get(), |
| 154 output_surface_.get(), | 154 output_surface_.get(), |
| 155 resource_provider_.get(), | 155 resource_provider_.get(), |
| (...skipping 26 matching lines...) Expand all Loading... |
| 182 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); | 182 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); |
| 183 output_surface_->BindToClient(fake_client_.get()); | 183 output_surface_->BindToClient(fake_client_.get()); |
| 184 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); | 184 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); |
| 185 renderer_ = SoftwareRenderer::Create( | 185 renderer_ = SoftwareRenderer::Create( |
| 186 fake_client_.get(), | 186 fake_client_.get(), |
| 187 output_surface_.get(), | 187 output_surface_.get(), |
| 188 resource_provider_.get()).PassAs<DirectRenderer>(); | 188 resource_provider_.get()).PassAs<DirectRenderer>(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 } // namespace cc | 191 } // namespace cc |
| OLD | NEW |