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

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: add tests and 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 LayerTreeHostReadbackCrashPixelTest
1148 : public LayerTreeHostReadbackPixelTest,
1149 public testing::WithParamInterface<bool> {};
1150
1151 TEST_P(LayerTreeHostReadbackCrashPixelTest,
danakj 2015/02/06 18:57:26 LTHReadbackNonFirstNonRootRenderPassTest?
1152 ReadbackNonRootOrFirstLayer) {
1153 scoped_refptr<SolidColorLayer> background =
danakj 2015/02/06 18:57:26 Can you add comment explaining this test has 3 ren
1154 CreateSolidColorLayer(gfx::Rect(200, 200), SK_ColorGREEN);
1155 background->SetForceRenderSurface(true);
1156
1157 scoped_refptr<SolidColorLayer> blue =
1158 CreateSolidColorLayer(gfx::Rect(150, 150, 50, 50), SK_ColorBLUE);
1159 blue->SetForceRenderSurface(true);
danakj 2015/02/06 18:57:26 can you also put a copy request on here (see line
1160 background->AddChild(blue);
1161
1162 RunReadbackTestWithReadbackTarget(
1163 GetParam() ? PIXEL_TEST_GL : PIXEL_TEST_SOFTWARE,
1164 READBACK_DEFAULT,
1165 background,
1166 background.get(),
1167 base::FilePath(FILE_PATH_LITERAL("green_with_blue_corner.png")));
1168 }
1169
1170 INSTANTIATE_TEST_CASE_P(LayerTreeHostReadbackCrashPixelTests,
1171 LayerTreeHostReadbackCrashPixelTest,
1172 testing::Bool());
1173
1147 } // namespace 1174 } // namespace
1148 } // namespace cc 1175 } // namespace cc
1149 1176
1150 #endif // OS_ANDROID 1177 #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