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

Unified Diff: cc/resources/platform_color.h

Issue 1535833002: Delete CC. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-5
Patch Set: rebase Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/layer_quad_unittest.cc ('k') | cc/resources/platform_color_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/platform_color.h
diff --git a/cc/resources/platform_color.h b/cc/resources/platform_color.h
deleted file mode 100644
index 17eddc1faa7552fde72ce800d2d636bc524e86e2..0000000000000000000000000000000000000000
--- a/cc/resources/platform_color.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CC_RESOURCES_PLATFORM_COLOR_H_
-#define CC_RESOURCES_PLATFORM_COLOR_H_
-
-#include "base/basictypes.h"
-#include "base/logging.h"
-#include "cc/resources/resource_format.h"
-#include "third_party/skia/include/core/SkTypes.h"
-
-namespace cc {
-
-class PlatformColor {
- public:
- enum SourceDataFormat {
- SOURCE_FORMAT_RGBA8,
- SOURCE_FORMAT_BGRA8
- };
-
- static SourceDataFormat Format() {
- return SK_B32_SHIFT ? SOURCE_FORMAT_RGBA8 : SOURCE_FORMAT_BGRA8;
- }
-
- // Returns the most efficient texture format for this platform.
- static ResourceFormat BestTextureFormat(bool supports_bgra8888) {
- switch (Format()) {
- case SOURCE_FORMAT_BGRA8:
- return (supports_bgra8888) ? BGRA_8888 : RGBA_8888;
- case SOURCE_FORMAT_RGBA8:
- return RGBA_8888;
- }
- NOTREACHED();
- return RGBA_8888;
- }
-
- // Return true if the given texture format has the same component order
- // as the color on this platform.
- static bool SameComponentOrder(ResourceFormat format) {
- switch (Format()) {
- case SOURCE_FORMAT_RGBA8:
- return format == RGBA_8888 || format == RGBA_4444;
- case SOURCE_FORMAT_BGRA8:
- return format == BGRA_8888 || format == RGBA_4444;
- }
- NOTREACHED();
- return false;
- }
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformColor);
-};
-
-} // namespace cc
-
-#endif // CC_RESOURCES_PLATFORM_COLOR_H_
« no previous file with comments | « cc/resources/layer_quad_unittest.cc ('k') | cc/resources/platform_color_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698