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/test/pixel_comparator.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
7 #include "ui/gfx/size.h" | 8 #include "ui/gfx/size.h" |
8 | 9 |
9 #ifndef CC_TEST_PIXEL_TEST_H_ | 10 #ifndef CC_TEST_PIXEL_TEST_H_ |
10 #define CC_TEST_PIXEL_TEST_H_ | 11 #define CC_TEST_PIXEL_TEST_H_ |
11 | 12 |
12 namespace cc { | 13 namespace cc { |
13 class GLRenderer; | 14 class GLRenderer; |
14 class OutputSurface; | 15 class OutputSurface; |
15 class ResourceProvider; | 16 class ResourceProvider; |
16 | 17 |
17 class PixelTest : public testing::Test { | 18 class PixelTest : public testing::Test { |
18 protected: | 19 protected: |
19 PixelTest(); | 20 PixelTest(); |
20 virtual ~PixelTest(); | 21 virtual ~PixelTest(); |
21 | 22 |
22 virtual void SetUp() OVERRIDE; | 23 virtual void SetUp() OVERRIDE; |
23 | 24 |
24 bool PixelsMatchReference(const base::FilePath& ref_file, | 25 bool PixelsMatchReference(const base::FilePath& ref_file, |
25 bool discard_transparency); | 26 const PixelComparator& comparator); |
26 | 27 |
27 gfx::Size device_viewport_size_; | 28 gfx::Size device_viewport_size_; |
28 scoped_ptr<OutputSurface> output_surface_; | 29 scoped_ptr<OutputSurface> output_surface_; |
29 scoped_ptr<ResourceProvider> resource_provider_; | 30 scoped_ptr<ResourceProvider> resource_provider_; |
30 class PixelTestRendererClient; | 31 class PixelTestRendererClient; |
31 scoped_ptr<PixelTestRendererClient> fake_client_; | 32 scoped_ptr<PixelTestRendererClient> fake_client_; |
32 scoped_ptr<GLRenderer> renderer_; | 33 scoped_ptr<GLRenderer> renderer_; |
33 }; | 34 }; |
34 | 35 |
35 } // namespace cc | 36 } // namespace cc |
36 | 37 |
37 #endif // CC_TEST_PIXEL_TEST_H_ | 38 #endif // CC_TEST_PIXEL_TEST_H_ |
OLD | NEW |