| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "cc/tiles/software_image_decode_cache.h" | 5 #include "cc/tiles/software_image_decode_cache.h" |
| 6 | 6 |
| 7 #include "cc/paint/draw_image.h" | 7 #include "cc/paint/draw_image.h" |
| 8 #include "cc/resources/resource_format.h" | 8 #include "cc/resources/resource_format.h" |
| 9 #include "cc/test/test_tile_task_runner.h" | 9 #include "cc/test/test_tile_task_runner.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 EXPECT_TRUE(second_task); | 687 EXPECT_TRUE(second_task); |
| 688 EXPECT_TRUE(first_task.get() != second_task.get()); | 688 EXPECT_TRUE(first_task.get() != second_task.get()); |
| 689 | 689 |
| 690 TestTileTaskRunner::ProcessTask(first_task.get()); | 690 TestTileTaskRunner::ProcessTask(first_task.get()); |
| 691 TestTileTaskRunner::ProcessTask(second_task.get()); | 691 TestTileTaskRunner::ProcessTask(second_task.get()); |
| 692 | 692 |
| 693 cache.UnrefImage(first_draw_image); | 693 cache.UnrefImage(first_draw_image); |
| 694 cache.UnrefImage(second_draw_image); | 694 cache.UnrefImage(second_draw_image); |
| 695 } | 695 } |
| 696 | 696 |
| 697 TEST(SoftwareImageDecodeCacheTest, GetTaskForImageDifferentColorSpace) { | 697 // crbug.com/709341 |
| 698 #if defined(MEMORY_SANITIZER) |
| 699 #define MAYBE_GetTaskForImageDifferentColorSpace \ |
| 700 DISABLED_GetTaskForImageDifferentColorSpace |
| 701 #else |
| 702 #define MAYBE_GetTaskForImageDifferentColorSpace \ |
| 703 GetTaskForImageDifferentColorSpace |
| 704 #endif |
| 705 TEST(SoftwareImageDecodeCacheTest, MAYBE_GetTaskForImageDifferentColorSpace) { |
| 698 TestSoftwareImageDecodeCache cache; | 706 TestSoftwareImageDecodeCache cache; |
| 699 bool is_decomposable = true; | 707 bool is_decomposable = true; |
| 700 SkFilterQuality quality = kHigh_SkFilterQuality; | 708 SkFilterQuality quality = kHigh_SkFilterQuality; |
| 701 | 709 |
| 702 gfx::ColorSpace color_space_a(gfx::ColorSpace::PrimaryID::XYZ_D50, | 710 gfx::ColorSpace color_space_a(gfx::ColorSpace::PrimaryID::XYZ_D50, |
| 703 gfx::ColorSpace::TransferID::IEC61966_2_1); | 711 gfx::ColorSpace::TransferID::IEC61966_2_1); |
| 704 gfx::ColorSpace color_space_b(gfx::ColorSpace::PrimaryID::SMPTE170M, | 712 gfx::ColorSpace color_space_b(gfx::ColorSpace::PrimaryID::SMPTE170M, |
| 705 gfx::ColorSpace::TransferID::IEC61966_2_1); | 713 gfx::ColorSpace::TransferID::IEC61966_2_1); |
| 706 gfx::ColorSpace color_space_c = gfx::ColorSpace::CreateSRGB(); | 714 gfx::ColorSpace color_space_c = gfx::ColorSpace::CreateSRGB(); |
| 707 | 715 |
| (...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1588 EXPECT_EQ(10u, cache.GetNumCacheEntriesForTesting()); | 1596 EXPECT_EQ(10u, cache.GetNumCacheEntriesForTesting()); |
| 1589 | 1597 |
| 1590 // Tell our cache to clear resources. | 1598 // Tell our cache to clear resources. |
| 1591 cache.ClearCache(); | 1599 cache.ClearCache(); |
| 1592 | 1600 |
| 1593 EXPECT_EQ(0u, cache.GetNumCacheEntriesForTesting()); | 1601 EXPECT_EQ(0u, cache.GetNumCacheEntriesForTesting()); |
| 1594 } | 1602 } |
| 1595 | 1603 |
| 1596 } // namespace | 1604 } // namespace |
| 1597 } // namespace cc | 1605 } // namespace cc |
| OLD | NEW |