Chromium Code Reviews| Index: cc/trees/layer_tree_host_pixeltest_readback.cc |
| diff --git a/cc/trees/layer_tree_host_pixeltest_readback.cc b/cc/trees/layer_tree_host_pixeltest_readback.cc |
| index 0a06144e87c3481937292b558560558471f28e50..82c41394ec8134efdc70c7b86587513d2a133073 100644 |
| --- a/cc/trees/layer_tree_host_pixeltest_readback.cc |
| +++ b/cc/trees/layer_tree_host_pixeltest_readback.cc |
| @@ -1144,6 +1144,41 @@ TEST_F(LayerTreeHostReadbackPixelTest, ReadbackNonRootLayerOutsideViewport) { |
| base::FilePath(FILE_PATH_LITERAL("green_with_blue_corner.png"))); |
| } |
| +class LTHReadbackNonFirstNonRootRenderPassTest |
|
danakj
2015/02/06 23:11:42
Sorry LTH I meant LayerTreeHost, but was saving ty
|
| + : public LayerTreeHostReadbackPixelTest, |
| + public testing::WithParamInterface<bool> {}; |
| + |
| +TEST_P(LTHReadbackNonFirstNonRootRenderPassTest, |
| + ReadbackNonRootOrFirstLayer) { |
| + // This test has 3 render passes with the copy request |
|
danakj
2015/02/06 23:11:43
Wrap this comment at 80 columns instead of at 60 o
|
| + // on the renderpass in the middle. Doing a copy request |
|
danakj
2015/02/06 23:11:42
"RenderPass" or "render pass", not "renderpass"
|
| + // can be destructive of state, so for renderpasses after |
|
danakj
2015/02/06 23:11:42
ditto
|
| + // the first drawn the code path is different. |
| + // This verifies the non - first and non - root path. |
|
danakj
2015/02/06 23:11:42
no spaces around -
|
| + // See http://crbug.com/99393 for more information. |
| + scoped_refptr<SolidColorLayer> background = |
| + CreateSolidColorLayer(gfx::Rect(200, 200), SK_ColorGREEN); |
| + background->SetForceRenderSurface(true); |
|
danakj
2015/02/06 23:11:42
do these SetForceRS calls actually do anything for
|
| + |
| + scoped_refptr<SolidColorLayer> blue = |
| + CreateSolidColorLayer(gfx::Rect(150, 150, 50, 50), SK_ColorBLUE); |
| + blue->SetForceRenderSurface(true); |
|
danakj
2015/02/06 23:11:43
same here?
|
| + blue->RequestCopyOfOutput(CopyOutputRequest::CreateBitmapRequest( |
| + base::Bind(&IgnoreReadbackResult))); |
| + background->AddChild(blue); |
| + |
| + RunReadbackTestWithReadbackTarget( |
| + GetParam() ? PIXEL_TEST_GL : PIXEL_TEST_SOFTWARE, |
| + READBACK_DEFAULT, |
| + background, |
| + background.get(), |
| + base::FilePath(FILE_PATH_LITERAL("green_with_blue_corner.png"))); |
| +} |
| + |
| +INSTANTIATE_TEST_CASE_P(LTHReadbackNonFirstNonRootRenderPassTests, |
| + LTHReadbackNonFirstNonRootRenderPassTest, |
| + testing::Bool()); |
| + |
| } // namespace |
| } // namespace cc |