| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
| 6 #include "cc/output/gl_renderer.h" | 6 #include "cc/output/gl_renderer.h" |
| 7 #include "cc/quads/draw_quad.h" | 7 #include "cc/quads/draw_quad.h" |
| 8 #include "cc/quads/picture_draw_quad.h" | 8 #include "cc/quads/picture_draw_quad.h" |
| 9 #include "cc/quads/texture_draw_quad.h" | 9 #include "cc/quads/texture_draw_quad.h" |
| 10 #include "cc/resources/video_resource_updater.h" | 10 #include "cc/resources/video_resource_updater.h" |
| (...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 gfx::Vector2dF(), | 1330 gfx::Vector2dF(), |
| 1331 gfx::Size(), | 1331 gfx::Size(), |
| 1332 filters, | 1332 filters, |
| 1333 gfx::Vector2dF(), | 1333 gfx::Vector2dF(), |
| 1334 FilterOperations()); | 1334 FilterOperations()); |
| 1335 | 1335 |
| 1336 RenderPassList pass_list; | 1336 RenderPassList pass_list; |
| 1337 pass_list.push_back(child_pass.Pass()); | 1337 pass_list.push_back(child_pass.Pass()); |
| 1338 pass_list.push_back(root_pass.Pass()); | 1338 pass_list.push_back(root_pass.Pass()); |
| 1339 | 1339 |
| 1340 // This test blends slightly differently with the software renderer vs. the gl |
| 1341 // renderer so use a fuzzy comparator. |
| 1340 EXPECT_TRUE(this->RunPixelTest( | 1342 EXPECT_TRUE(this->RunPixelTest( |
| 1341 &pass_list, | 1343 &pass_list, base::FilePath(FILE_PATH_LITERAL("blue_yellow_alpha.png")), |
| 1342 base::FilePath(FILE_PATH_LITERAL("blue_yellow_alpha.png")), | 1344 FuzzyForSoftwareOnlyPixelComparator<TypeParam>(false))); |
| 1343 ExactPixelComparator(true))); | |
| 1344 } | 1345 } |
| 1345 | 1346 |
| 1346 TYPED_TEST(RendererPixelTest, FastPassFilterChain) { | 1347 TYPED_TEST(RendererPixelTest, FastPassFilterChain) { |
| 1347 gfx::Rect viewport_rect(this->device_viewport_size_); | 1348 gfx::Rect viewport_rect(this->device_viewport_size_); |
| 1348 | 1349 |
| 1349 RenderPassId root_pass_id(1, 1); | 1350 RenderPassId root_pass_id(1, 1); |
| 1350 scoped_ptr<RenderPass> root_pass = | 1351 scoped_ptr<RenderPass> root_pass = |
| 1351 CreateTestRootRenderPass(root_pass_id, viewport_rect); | 1352 CreateTestRootRenderPass(root_pass_id, viewport_rect); |
| 1352 | 1353 |
| 1353 RenderPassId child_pass_id(2, 2); | 1354 RenderPassId child_pass_id(2, 2); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 gfx::Vector2dF(), | 1402 gfx::Vector2dF(), |
| 1402 gfx::Size(), | 1403 gfx::Size(), |
| 1403 filters, | 1404 filters, |
| 1404 gfx::Vector2dF(), | 1405 gfx::Vector2dF(), |
| 1405 FilterOperations()); | 1406 FilterOperations()); |
| 1406 | 1407 |
| 1407 RenderPassList pass_list; | 1408 RenderPassList pass_list; |
| 1408 pass_list.push_back(child_pass.Pass()); | 1409 pass_list.push_back(child_pass.Pass()); |
| 1409 pass_list.push_back(root_pass.Pass()); | 1410 pass_list.push_back(root_pass.Pass()); |
| 1410 | 1411 |
| 1412 // This test blends slightly differently with the software renderer vs. the gl |
| 1413 // renderer so use a fuzzy comparator. |
| 1411 EXPECT_TRUE(this->RunPixelTest( | 1414 EXPECT_TRUE(this->RunPixelTest( |
| 1412 &pass_list, | 1415 &pass_list, |
| 1413 base::FilePath(FILE_PATH_LITERAL("blue_yellow_filter_chain.png")), | 1416 base::FilePath(FILE_PATH_LITERAL("blue_yellow_filter_chain.png")), |
| 1414 ExactPixelComparator(true))); | 1417 FuzzyForSoftwareOnlyPixelComparator<TypeParam>(false))); |
| 1415 } | 1418 } |
| 1416 | 1419 |
| 1417 TYPED_TEST(RendererPixelTest, FastPassColorFilterAlphaTranslation) { | 1420 TYPED_TEST(RendererPixelTest, FastPassColorFilterAlphaTranslation) { |
| 1418 gfx::Rect viewport_rect(this->device_viewport_size_); | 1421 gfx::Rect viewport_rect(this->device_viewport_size_); |
| 1419 | 1422 |
| 1420 RenderPassId root_pass_id(1, 1); | 1423 RenderPassId root_pass_id(1, 1); |
| 1421 scoped_ptr<RenderPass> root_pass = | 1424 scoped_ptr<RenderPass> root_pass = |
| 1422 CreateTestRootRenderPass(root_pass_id, viewport_rect); | 1425 CreateTestRootRenderPass(root_pass_id, viewport_rect); |
| 1423 | 1426 |
| 1424 RenderPassId child_pass_id(2, 2); | 1427 RenderPassId child_pass_id(2, 2); |
| (...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2939 ? FILE_PATH_LITERAL("four_blue_green_checkers.png") | 2942 ? FILE_PATH_LITERAL("four_blue_green_checkers.png") |
| 2940 : FILE_PATH_LITERAL("checkers_big.png"); | 2943 : FILE_PATH_LITERAL("checkers_big.png"); |
| 2941 EXPECT_TRUE(this->RunPixelTest(&pass_list, base::FilePath(path), | 2944 EXPECT_TRUE(this->RunPixelTest(&pass_list, base::FilePath(path), |
| 2942 ExactPixelComparator(true))); | 2945 ExactPixelComparator(true))); |
| 2943 } | 2946 } |
| 2944 | 2947 |
| 2945 #endif // !defined(OS_ANDROID) | 2948 #endif // !defined(OS_ANDROID) |
| 2946 | 2949 |
| 2947 } // namespace | 2950 } // namespace |
| 2948 } // namespace cc | 2951 } // namespace cc |
| OLD | NEW |