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

Side by Side Diff: cc/resources/platform_color_unittest.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « cc/resources/picture_pile_unittest.cc ('k') | cc/resources/prioritized_resource_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "cc/resources/platform_color.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace cc {
10 namespace {
11
12 // Verify SameComponentOrder on this platform.
13 TEST(PlatformColorTest, SameComponentOrder) {
14 bool rgba = !!SK_B32_SHIFT;
15
16 for (size_t i = 0; i <= RESOURCE_FORMAT_MAX; ++i) {
17 ResourceFormat format = static_cast<ResourceFormat>(i);
18 switch (format) {
19 case RGBA_8888:
20 EXPECT_EQ(rgba, PlatformColor::SameComponentOrder(format));
21 break;
22 case RGBA_4444:
23 // RGBA_4444 indicates the number of bytes per pixel but the format
24 // doesn't actually imply RGBA ordering. It uses the native ordering.
25 EXPECT_EQ(true, PlatformColor::SameComponentOrder(format));
26 break;
27 case BGRA_8888:
28 EXPECT_NE(rgba, PlatformColor::SameComponentOrder(format));
29 break;
30 case ALPHA_8:
31 case LUMINANCE_8:
32 case RGB_565:
33 case ETC1:
34 case RED_8:
35 EXPECT_FALSE(PlatformColor::SameComponentOrder(format));
36 break;
37 }
38 }
39 }
40
41 } // namespace
42 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile_unittest.cc ('k') | cc/resources/prioritized_resource_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698