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 |
11 #ifndef CC_TEST_LAYER_TREE_PIXEL_TEST_H_ | 11 #ifndef CC_TEST_LAYER_TREE_PIXEL_TEST_H_ |
12 #define CC_TEST_LAYER_TREE_PIXEL_TEST_H_ | 12 #define CC_TEST_LAYER_TREE_PIXEL_TEST_H_ |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 class LayerTreeHost; | 15 class LayerTreeHost; |
16 class PixelComparator; | 16 class PixelComparator; |
17 | 17 |
18 class LayerTreePixelTest : public LayerTreeTest { | 18 class LayerTreePixelTest : public LayerTreeTest { |
19 protected: | 19 protected: |
20 LayerTreePixelTest(); | 20 LayerTreePixelTest(); |
21 virtual ~LayerTreePixelTest(); | 21 virtual ~LayerTreePixelTest(); |
22 | 22 |
23 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE; | 23 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE; |
24 virtual scoped_refptr<cc::ContextProvider> | 24 virtual scoped_refptr<cc::ContextProvider> |
25 OffscreenContextProviderForMainThread() OVERRIDE; | 25 OffscreenContextProviderForMainThread() OVERRIDE; |
26 virtual scoped_refptr<cc::ContextProvider> | 26 virtual scoped_refptr<cc::ContextProvider> |
27 OffscreenContextProviderForCompositorThread() OVERRIDE; | 27 OffscreenContextProviderForCompositorThread() OVERRIDE; |
28 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, | 28 |
29 bool result) OVERRIDE; | 29 void ReadbackResult(scoped_ptr<SkBitmap> bitmap); |
30 | 30 |
31 virtual void BeginTest() OVERRIDE; | 31 virtual void BeginTest() OVERRIDE; |
32 virtual void SetupTree() OVERRIDE; | 32 virtual void SetupTree() OVERRIDE; |
33 virtual void AfterTest() OVERRIDE; | 33 virtual void AfterTest() OVERRIDE; |
34 | 34 |
35 scoped_refptr<SolidColorLayer> CreateSolidColorLayer(gfx::Rect rect, | 35 scoped_refptr<SolidColorLayer> CreateSolidColorLayer(gfx::Rect rect, |
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, |
(...skipping 13 matching lines...) Expand all Loading... |
53 scoped_ptr<PixelComparator> pixel_comparator_; | 53 scoped_ptr<PixelComparator> pixel_comparator_; |
54 | 54 |
55 private: | 55 private: |
56 scoped_refptr<Layer> content_root_; | 56 scoped_refptr<Layer> content_root_; |
57 base::FilePath ref_file_; | 57 base::FilePath ref_file_; |
58 }; | 58 }; |
59 | 59 |
60 } // namespace cc | 60 } // namespace cc |
61 | 61 |
62 #endif // CC_TEST_LAYER_TREE_PIXEL_TEST_H_ | 62 #endif // CC_TEST_LAYER_TREE_PIXEL_TEST_H_ |
OLD | NEW |