| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| (...skipping 3475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3486 color_quad->SetNew(shared_state, rect, rect, SK_ColorWHITE, false); | 3486 color_quad->SetNew(shared_state, rect, rect, SK_ColorWHITE, false); |
| 3487 } | 3487 } |
| 3488 | 3488 |
| 3489 RenderPassList pass_list; | 3489 RenderPassList pass_list; |
| 3490 pass_list.push_back(std::move(pass)); | 3490 pass_list.push_back(std::move(pass)); |
| 3491 | 3491 |
| 3492 // Allow a difference of 2 bytes in comparison for shader-based transforms, | 3492 // Allow a difference of 2 bytes in comparison for shader-based transforms, |
| 3493 // and 4 bytes for LUT-based transforms (determined empirically). | 3493 // and 4 bytes for LUT-based transforms (determined empirically). |
| 3494 FuzzyPixelComparator comparator(false, 100.f, 0.f, 2.f, 2, 0); | 3494 FuzzyPixelComparator comparator(false, 100.f, 0.f, 2.f, 2, 0); |
| 3495 if (!transform->CanGetShaderSource()) | 3495 if (!transform->CanGetShaderSource()) |
| 3496 comparator = FuzzyPixelComparator(false, 100.f, 0.f, 4.f, 4, 0); | 3496 comparator = FuzzyPixelComparator(false, 100.f, 0.f, 6.f, 6, 0); |
| 3497 EXPECT_TRUE(RunPixelTest(&pass_list, &expected_output_colors, comparator)); | 3497 EXPECT_TRUE(RunPixelTest(&pass_list, &expected_output_colors, comparator)); |
| 3498 } | 3498 } |
| 3499 | 3499 |
| 3500 typedef gfx::ColorSpace::PrimaryID PrimaryID; | 3500 typedef gfx::ColorSpace::PrimaryID PrimaryID; |
| 3501 typedef gfx::ColorSpace::TransferID TransferID; | 3501 typedef gfx::ColorSpace::TransferID TransferID; |
| 3502 typedef gfx::ColorSpace::MatrixID MatrixID; | 3502 typedef gfx::ColorSpace::MatrixID MatrixID; |
| 3503 typedef gfx::ColorSpace::RangeID RangeID; | 3503 typedef gfx::ColorSpace::RangeID RangeID; |
| 3504 | 3504 |
| 3505 gfx::ColorSpace src_color_spaces[] = { | 3505 gfx::ColorSpace src_color_spaces[] = { |
| 3506 // This will be replaced by an ICC-based space (which can't be initialized | 3506 // This will be replaced by an ICC-based space (which can't be initialized |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3569 INSTANTIATE_TEST_CASE_P( | 3569 INSTANTIATE_TEST_CASE_P( |
| 3570 ToColorSpace, | 3570 ToColorSpace, |
| 3571 ColorTransformPixelTest, | 3571 ColorTransformPixelTest, |
| 3572 testing::Combine(testing::ValuesIn(intermediate_color_spaces), | 3572 testing::Combine(testing::ValuesIn(intermediate_color_spaces), |
| 3573 testing::ValuesIn(dst_color_spaces))); | 3573 testing::ValuesIn(dst_color_spaces))); |
| 3574 | 3574 |
| 3575 #endif // !defined(OS_ANDROID) | 3575 #endif // !defined(OS_ANDROID) |
| 3576 | 3576 |
| 3577 } // namespace | 3577 } // namespace |
| 3578 } // namespace cc | 3578 } // namespace cc |
| OLD | NEW |