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 10 matching lines...) Expand all Loading... |
21 class OutputSurface; | 21 class OutputSurface; |
22 class ResourceProvider; | 22 class ResourceProvider; |
23 class SoftwareRenderer; | 23 class SoftwareRenderer; |
24 class SharedBitmapManager; | 24 class SharedBitmapManager; |
25 | 25 |
26 class PixelTest : public testing::Test, RendererClient { | 26 class PixelTest : public testing::Test, RendererClient { |
27 protected: | 27 protected: |
28 PixelTest(); | 28 PixelTest(); |
29 virtual ~PixelTest(); | 29 virtual ~PixelTest(); |
30 | 30 |
31 enum OffscreenContextOption { | |
32 NoOffscreenContext, | |
33 WithOffscreenContext | |
34 }; | |
35 | |
36 bool RunPixelTest(RenderPassList* pass_list, | 31 bool RunPixelTest(RenderPassList* pass_list, |
37 OffscreenContextOption provide_offscreen_context, | |
38 const base::FilePath& ref_file, | 32 const base::FilePath& ref_file, |
39 const PixelComparator& comparator); | 33 const PixelComparator& comparator); |
40 | 34 |
41 bool RunPixelTestWithReadbackTarget( | 35 bool RunPixelTestWithReadbackTarget( |
42 RenderPassList* pass_list, | 36 RenderPassList* pass_list, |
43 RenderPass* target, | 37 RenderPass* target, |
44 OffscreenContextOption provide_offscreen_context, | |
45 const base::FilePath& ref_file, | 38 const base::FilePath& ref_file, |
46 const PixelComparator& comparator); | 39 const PixelComparator& comparator); |
47 | 40 |
48 LayerTreeSettings settings_; | 41 LayerTreeSettings settings_; |
49 gfx::Size device_viewport_size_; | 42 gfx::Size device_viewport_size_; |
50 bool disable_picture_quad_image_filtering_; | 43 bool disable_picture_quad_image_filtering_; |
51 class PixelTestRendererClient; | 44 class PixelTestRendererClient; |
52 scoped_ptr<FakeOutputSurfaceClient> output_surface_client_; | 45 scoped_ptr<FakeOutputSurfaceClient> output_surface_client_; |
53 scoped_ptr<OutputSurface> output_surface_; | 46 scoped_ptr<OutputSurface> output_surface_; |
54 scoped_ptr<SharedBitmapManager> shared_bitmap_manager_; | 47 scoped_ptr<SharedBitmapManager> shared_bitmap_manager_; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 SoftwareRendererWithExpandedViewport>::ExpandedViewport() const { | 181 SoftwareRendererWithExpandedViewport>::ExpandedViewport() const { |
189 return true; | 182 return true; |
190 } | 183 } |
191 | 184 |
192 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; | 185 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; |
193 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; | 186 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; |
194 | 187 |
195 } // namespace cc | 188 } // namespace cc |
196 | 189 |
197 #endif // CC_TEST_PIXEL_TEST_H_ | 190 #endif // CC_TEST_PIXEL_TEST_H_ |
OLD | NEW |