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

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

Issue 15004009: cc: Fix readback from non-root layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/output/software_renderer.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
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
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_
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/test/layer_tree_pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698