| 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/resources/platform_color.h" | 5 #include "cc/resources/platform_color.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 10 |
| 9 namespace cc { | 11 namespace cc { |
| 10 namespace { | 12 namespace { |
| 11 | 13 |
| 12 // Verify SameComponentOrder on this platform. | 14 // Verify SameComponentOrder on this platform. |
| 13 TEST(PlatformColorTest, SameComponentOrder) { | 15 TEST(PlatformColorTest, SameComponentOrder) { |
| 14 bool rgba = !!SK_B32_SHIFT; | 16 bool rgba = !!SK_B32_SHIFT; |
| 15 | 17 |
| 16 for (size_t i = 0; i <= RESOURCE_FORMAT_MAX; ++i) { | 18 for (size_t i = 0; i <= RESOURCE_FORMAT_MAX; ++i) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 33 case ETC1: | 35 case ETC1: |
| 34 case RED_8: | 36 case RED_8: |
| 35 EXPECT_FALSE(PlatformColor::SameComponentOrder(format)); | 37 EXPECT_FALSE(PlatformColor::SameComponentOrder(format)); |
| 36 break; | 38 break; |
| 37 } | 39 } |
| 38 } | 40 } |
| 39 } | 41 } |
| 40 | 42 |
| 41 } // namespace | 43 } // namespace |
| 42 } // namespace cc | 44 } // namespace cc |
| OLD | NEW |