summaryrefslogtreecommitdiffstats
path: root/cc/test/layer_tree_pixel_test.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 21:46:11 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 21:46:11 +0000
commitd4d017e13286b6d328dd5a62d324149b863189ad (patch)
treec24d576eb00a033aef3f1d7d136bfe7d248b4778 /cc/test/layer_tree_pixel_test.h
parent83b3c9e05dffd57392fc3877c6b3c3f4546c210d (diff)
downloadchromium_src-d4d017e13286b6d328dd5a62d324149b863189ad.zip
chromium_src-d4d017e13286b6d328dd5a62d324149b863189ad.tar.gz
chromium_src-d4d017e13286b6d328dd5a62d324149b863189ad.tar.bz2
cc: Allow output readback/copy requests to specify a sub-rect to copy.
The CopyOutputRequest API is on cc::Layer, so the rect it is given should be in layer space. Also add tests for CompositeAndReadback which no longer had any pixel test coverage in cc/ to ensure that its inputs are correctly applied as device viewport space. Clean up the layer tree pixel test framework by passing the test type (GL/Software cross Bitmap/Texture) as a parameter to RunPixelTest() instead of having tests set a pair of bools. Forces all tests to specify the test type. Tests: LayerTreeHostReadbackPixelTest.ReadbackSubrect_Software LayerTreeHostReadbackPixelTest.ReadbackSubrect_GL_Bitmap LayerTreeHostReadbackPixelTest.ReadbackSubrect_GL LayerTreeHostReadbackPixelTest.ReadbackNonRootLayerSubrect_Software LayerTreeHostReadbackPixelTest.ReadbackNonRootLayerSubrect_GL_Bitmap LayerTreeHostReadbackPixelTest.ReadbackNonRootLayerSubrect_GL LayerTreeHostReadbackDeviceScalePixelTest.ReadbackSubrect_Software LayerTreeHostReadbackDeviceScalePixelTest.ReadbackSubrect_GL LayerTreeHostReadbackDeviceScalePixelTest.ReadbackNonRootLayerSubrect_Software LayerTreeHostReadbackDeviceScalePixelTest.ReadbackNonRootLayerSubrect_GL LayerTreeHostReadbackViaCompositeAndReadbackPixelTest.CompositeAndReadback_Software_1 LayerTreeHostReadbackViaCompositeAndReadbackPixelTest.CompositeAndReadback_Software_2 LayerTreeHostReadbackViaCompositeAndReadbackPixelTest.CompositeAndReadback_GL_1 LayerTreeHostReadbackViaCompositeAndReadbackPixelTest.CompositeAndReadback_GL_2 R=piman BUG=251754 Merged https://codereview.chromium.org/17449014/ and https://codereview.chromium.org/17261009/ into this CL. Review URL: https://chromiumcodereview.appspot.com/17335011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207589 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/layer_tree_pixel_test.h')
-rw-r--r--cc/test/layer_tree_pixel_test.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/cc/test/layer_tree_pixel_test.h b/cc/test/layer_tree_pixel_test.h
index b485237..72c14d5 100644
--- a/cc/test/layer_tree_pixel_test.h
+++ b/cc/test/layer_tree_pixel_test.h
@@ -47,10 +47,19 @@ class LayerTreePixelTest : public LayerTreeTest {
int border_width,
SkColor border_color);
- void RunPixelTest(scoped_refptr<Layer> content_root,
+ enum PixelTestType {
+ GL_WITH_DEFAULT,
+ GL_WITH_BITMAP,
+ SOFTWARE_WITH_DEFAULT,
+ SOFTWARE_WITH_BITMAP
+ };
+
+ void RunPixelTest(PixelTestType type,
+ scoped_refptr<Layer> content_root,
base::FilePath file_name);
- void RunPixelTestWithReadbackTarget(scoped_refptr<Layer> content_root,
+ void RunPixelTestWithReadbackTarget(PixelTestType type,
+ scoped_refptr<Layer> content_root,
Layer* target,
base::FilePath file_name);
@@ -68,7 +77,7 @@ class LayerTreePixelTest : public LayerTreeTest {
scoped_ptr<PixelComparator> pixel_comparator_;
protected:
- bool use_gl_;
+ PixelTestType test_type_;
scoped_refptr<Layer> content_root_;
Layer* readback_target_;
base::FilePath ref_file_;