Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1039)

Side by Side Diff: cc/test/layer_tree_pixel_test.h

Issue 12518026: cc: Add layer-based pixel tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layer_tree_host_pixeltest_filters.cc ('k') | cc/test/layer_tree_pixel_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/files/file_path.h"
6 #include "cc/solid_color_layer.h"
7 #include "cc/test/layer_tree_test_common.h"
8
9 #ifndef CC_TEST_LAYER_TREE_PIXEL_TEST_H_
10 #define CC_TEST_LAYER_TREE_PIXEL_TEST_H_
11
12 namespace cc {
13 class LayerTreeHost;
14
15 class LayerTreePixelTest : public ThreadedTest {
16 protected:
17 LayerTreePixelTest();
18 virtual ~LayerTreePixelTest();
19
20 bool RunTest(scoped_refptr<Layer> root_layer,
21 const base::FilePath::StringType& file_name);
22
23 virtual scoped_ptr<OutputSurface> createOutputSurface() OVERRIDE;
24 virtual scoped_refptr<cc::ContextProvider>
25 OffscreenContextProviderForMainThread() OVERRIDE;
26 virtual scoped_refptr<cc::ContextProvider>
27 OffscreenContextProviderForCompositorThread() OVERRIDE;
28 virtual void swapBuffersOnThread(LayerTreeHostImpl* host_impl,
29 bool result) OVERRIDE;
30
31 virtual void beginTest() OVERRIDE;
32 virtual void setupTree() OVERRIDE;
33 virtual void afterTest() OVERRIDE;
34
35 scoped_refptr<SolidColorLayer> CreateSolidColorLayer(gfx::Rect rect,
36 SkColor color);
37
38 void RunPixelTest(scoped_refptr<Layer> content_root,
39 base::FilePath file_name);
40
41 // Common CSS colors defined for tests to use.
42 enum Colors {
43 kCSSOrange = 0xffffa500,
44 kCSSBrown = 0xffa52a2a,
45 kCSSGreen = 0xff008000,
46 };
47
48 private:
49 scoped_refptr<Layer> content_root_;
50 base::FilePath ref_file_;
51 };
52
53 } // namespace cc
54
55 #endif // CC_TEST_LAYER_TREE_PIXEL_TEST_H_
OLDNEW
« no previous file with comments | « cc/layer_tree_host_pixeltest_filters.cc ('k') | cc/test/layer_tree_pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698