| 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/files/file_path.h" | 5 #include "base/files/file_path.h" |
| 6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "cc/layers/solid_color_layer.h" | 8 #include "cc/layers/solid_color_layer.h" |
| 9 #include "cc/test/layer_tree_test.h" | 9 #include "cc/test/layer_tree_test.h" |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 SkColor color); | 36 SkColor color); |
| 37 scoped_refptr<SolidColorLayer> CreateSolidColorLayerWithBorder( | 37 scoped_refptr<SolidColorLayer> CreateSolidColorLayerWithBorder( |
| 38 gfx::Rect rect, | 38 gfx::Rect rect, |
| 39 SkColor color, | 39 SkColor color, |
| 40 int border_width, | 40 int border_width, |
| 41 SkColor border_color); | 41 SkColor border_color); |
| 42 | 42 |
| 43 void RunPixelTest(scoped_refptr<Layer> content_root, | 43 void RunPixelTest(scoped_refptr<Layer> content_root, |
| 44 base::FilePath file_name); | 44 base::FilePath file_name); |
| 45 | 45 |
| 46 void RunPixelTestWithReadbackTarget(scoped_refptr<Layer> content_root, |
| 47 Layer* target, |
| 48 base::FilePath file_name); |
| 49 |
| 46 // Common CSS colors defined for tests to use. | 50 // Common CSS colors defined for tests to use. |
| 47 enum Colors { | 51 enum Colors { |
| 48 kCSSOrange = 0xffffa500, | 52 kCSSOrange = 0xffffa500, |
| 49 kCSSBrown = 0xffa52a2a, | 53 kCSSBrown = 0xffa52a2a, |
| 50 kCSSGreen = 0xff008000, | 54 kCSSGreen = 0xff008000, |
| 51 }; | 55 }; |
| 52 | 56 |
| 53 scoped_ptr<PixelComparator> pixel_comparator_; | 57 scoped_ptr<PixelComparator> pixel_comparator_; |
| 54 | 58 |
| 55 private: | 59 private: |
| 56 scoped_refptr<Layer> content_root_; | 60 scoped_refptr<Layer> content_root_; |
| 61 Layer* readback_target_; |
| 57 base::FilePath ref_file_; | 62 base::FilePath ref_file_; |
| 58 }; | 63 }; |
| 59 | 64 |
| 60 } // namespace cc | 65 } // namespace cc |
| 61 | 66 |
| 62 #endif // CC_TEST_LAYER_TREE_PIXEL_TEST_H_ | 67 #endif // CC_TEST_LAYER_TREE_PIXEL_TEST_H_ |
| OLD | NEW |