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

Side by Side Diff: cc/trees/layer_tree_host_pixeltest_readback.cc

Issue 899183003: Fix double lock of texture resource in software renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove test and add comments Created 5 years, 10 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
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 "build/build_config.h" 5 #include "build/build_config.h"
6 #include "cc/layers/solid_color_layer.h" 6 #include "cc/layers/solid_color_layer.h"
7 #include "cc/layers/texture_layer.h" 7 #include "cc/layers/texture_layer.h"
8 #include "cc/output/copy_output_request.h" 8 #include "cc/output/copy_output_request.h"
9 #include "cc/output/copy_output_result.h" 9 #include "cc/output/copy_output_result.h"
10 #include "cc/test/fake_picture_layer.h" 10 #include "cc/test/fake_picture_layer.h"
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 green->AddChild(blue); 1137 green->AddChild(blue);
1138 1138
1139 RunReadbackTestWithReadbackTarget( 1139 RunReadbackTestWithReadbackTarget(
1140 PIXEL_TEST_GL, 1140 PIXEL_TEST_GL,
1141 READBACK_DEFAULT, 1141 READBACK_DEFAULT,
1142 background, 1142 background,
1143 green.get(), 1143 green.get(),
1144 base::FilePath(FILE_PATH_LITERAL("green_with_blue_corner.png"))); 1144 base::FilePath(FILE_PATH_LITERAL("green_with_blue_corner.png")));
1145 } 1145 }
1146 1146
1147 class LTHReadbackNonFirstNonRootRenderPassTest
danakj 2015/02/06 23:11:42 Sorry LTH I meant LayerTreeHost, but was saving ty
1148 : public LayerTreeHostReadbackPixelTest,
1149 public testing::WithParamInterface<bool> {};
1150
1151 TEST_P(LTHReadbackNonFirstNonRootRenderPassTest,
1152 ReadbackNonRootOrFirstLayer) {
1153 // 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
1154 // on the renderpass in the middle. Doing a copy request
danakj 2015/02/06 23:11:42 "RenderPass" or "render pass", not "renderpass"
1155 // can be destructive of state, so for renderpasses after
danakj 2015/02/06 23:11:42 ditto
1156 // the first drawn the code path is different.
1157 // This verifies the non - first and non - root path.
danakj 2015/02/06 23:11:42 no spaces around -
1158 // See http://crbug.com/99393 for more information.
1159 scoped_refptr<SolidColorLayer> background =
1160 CreateSolidColorLayer(gfx::Rect(200, 200), SK_ColorGREEN);
1161 background->SetForceRenderSurface(true);
danakj 2015/02/06 23:11:42 do these SetForceRS calls actually do anything for
1162
1163 scoped_refptr<SolidColorLayer> blue =
1164 CreateSolidColorLayer(gfx::Rect(150, 150, 50, 50), SK_ColorBLUE);
1165 blue->SetForceRenderSurface(true);
danakj 2015/02/06 23:11:43 same here?
1166 blue->RequestCopyOfOutput(CopyOutputRequest::CreateBitmapRequest(
1167 base::Bind(&IgnoreReadbackResult)));
1168 background->AddChild(blue);
1169
1170 RunReadbackTestWithReadbackTarget(
1171 GetParam() ? PIXEL_TEST_GL : PIXEL_TEST_SOFTWARE,
1172 READBACK_DEFAULT,
1173 background,
1174 background.get(),
1175 base::FilePath(FILE_PATH_LITERAL("green_with_blue_corner.png")));
1176 }
1177
1178 INSTANTIATE_TEST_CASE_P(LTHReadbackNonFirstNonRootRenderPassTests,
1179 LTHReadbackNonFirstNonRootRenderPassTest,
1180 testing::Bool());
1181
1147 } // namespace 1182 } // namespace
1148 } // namespace cc 1183 } // namespace cc
1149 1184
1150 #endif // OS_ANDROID 1185 #endif // OS_ANDROID
OLDNEW
« cc/output/software_renderer_unittest.cc ('K') | « cc/output/software_renderer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698