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