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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "cc/output/gl_renderer.h" | 6 #include "cc/output/gl_renderer.h" |
7 #include "cc/output/software_renderer.h" | 7 #include "cc/output/software_renderer.h" |
8 #include "cc/quads/render_pass.h" | 8 #include "cc/quads/render_pass.h" |
9 #include "cc/test/pixel_comparator.h" | 9 #include "cc/test/pixel_comparator.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 scoped_ptr<ResourceProvider> resource_provider_; | 48 scoped_ptr<ResourceProvider> resource_provider_; |
49 scoped_ptr<PixelTestRendererClient> fake_client_; | 49 scoped_ptr<PixelTestRendererClient> fake_client_; |
50 scoped_ptr<DirectRenderer> renderer_; | 50 scoped_ptr<DirectRenderer> renderer_; |
51 scoped_ptr<SkBitmap> result_bitmap_; | 51 scoped_ptr<SkBitmap> result_bitmap_; |
52 | 52 |
53 void SetUpGLRenderer(bool use_skia_gpu_backend); | 53 void SetUpGLRenderer(bool use_skia_gpu_backend); |
54 void SetUpSoftwareRenderer(); | 54 void SetUpSoftwareRenderer(); |
55 | 55 |
56 void ForceExpandedViewport(gfx::Size surface_expansion, | 56 void ForceExpandedViewport(gfx::Size surface_expansion, |
57 gfx::Vector2d viewport_offset); | 57 gfx::Vector2d viewport_offset); |
| 58 void ForceDeviceClip(gfx::Rect clip); |
58 void EnableExternalStencilTest(); | 59 void EnableExternalStencilTest(); |
59 | 60 |
60 private: | 61 private: |
61 void ReadbackResult(base::Closure quit_run_loop, | 62 void ReadbackResult(base::Closure quit_run_loop, |
62 scoped_ptr<CopyOutputResult> result); | 63 scoped_ptr<CopyOutputResult> result); |
63 | 64 |
64 bool PixelsMatchReference(const base::FilePath& ref_file, | 65 bool PixelsMatchReference(const base::FilePath& ref_file, |
65 const PixelComparator& comparator); | 66 const PixelComparator& comparator); |
66 }; | 67 }; |
67 | 68 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 } | 205 } |
205 | 206 |
206 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; | 207 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; |
207 typedef RendererPixelTest<GLRendererWithSkiaGPUBackend> | 208 typedef RendererPixelTest<GLRendererWithSkiaGPUBackend> |
208 GLRendererSkiaGPUBackendPixelTest; | 209 GLRendererSkiaGPUBackendPixelTest; |
209 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; | 210 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; |
210 | 211 |
211 } // namespace cc | 212 } // namespace cc |
212 | 213 |
213 #endif // CC_TEST_PIXEL_TEST_H_ | 214 #endif // CC_TEST_PIXEL_TEST_H_ |
OLD | NEW |