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

Side by Side Diff: components/display_compositor/gl_helper_unittest.cc

Issue 1943383002: Add display_compositor unittests into components_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <string.h> 8 #include <string.h>
9 #include <cmath> 9 #include <cmath>
10 #include <string> 10 #include <string>
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 "100x4 -> 64x1 bilinear2x2\n" 1256 "100x4 -> 64x1 bilinear2x2\n"
1257 "64x1 -> 8x1 bilinear4 X\n" 1257 "64x1 -> 8x1 bilinear4 X\n"
1258 "8x1 -> 1x1 bilinear4 X\n"); 1258 "8x1 -> 1x1 bilinear4 X\n");
1259 } 1259 }
1260 1260
1261 std::unique_ptr<gpu::GLInProcessContext> context_; 1261 std::unique_ptr<gpu::GLInProcessContext> context_;
1262 gpu::gles2::GLES2Interface* gl_; 1262 gpu::gles2::GLES2Interface* gl_;
1263 std::unique_ptr<display_compositor::GLHelper> helper_; 1263 std::unique_ptr<display_compositor::GLHelper> helper_;
1264 std::unique_ptr<display_compositor::GLHelperScaling> helper_scaling_; 1264 std::unique_ptr<display_compositor::GLHelperScaling> helper_scaling_;
1265 std::deque<GLHelperScaling::ScaleOp> x_ops_, y_ops_; 1265 std::deque<GLHelperScaling::ScaleOp> x_ops_, y_ops_;
1266 base::MessageLoop message_loop_;
Fady Samuel 2016/05/03 18:03:44 Do we use this?
Peng 2016/05/03 18:10:36 Yes. Without it, those tests crash.
1266 }; 1267 };
1267 1268
1268 class GLHelperPixelTest : public GLHelperTest { 1269 class GLHelperPixelTest : public GLHelperTest {
1269 private: 1270 private:
1270 gfx::DisableNullDrawGLBindings enable_pixel_output_; 1271 gfx::DisableNullDrawGLBindings enable_pixel_output_;
1271 }; 1272 };
1272 1273
1273 TEST_F(GLHelperTest, RGBASyncReadbackTest) { 1274 TEST_F(GLHelperTest, RGBASyncReadbackTest) {
1274 const int kTestSize = 64; 1275 const int kTestSize = 64;
1275 bool result = TestTextureFormatReadback(gfx::Size(kTestSize, kTestSize), 1276 bool result = TestTextureFormatReadback(gfx::Size(kTestSize, kTestSize),
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 } 1429 }
1429 } 1430 }
1430 } 1431 }
1431 1432
1432 TEST_F(GLHelperTest, CheckOptimizations) { 1433 TEST_F(GLHelperTest, CheckOptimizations) {
1433 // Test in baseclass since it is friends with GLHelperScaling 1434 // Test in baseclass since it is friends with GLHelperScaling
1434 CheckOptimizationsTest(); 1435 CheckOptimizationsTest();
1435 } 1436 }
1436 1437
1437 } // namespace display_compositor 1438 } // namespace display_compositor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698