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

Unified Diff: cc/platform_color.h

Issue 12471007: Part 8 of cc/ directory shuffles: resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/picture_pile_impl.cc ('k') | cc/prioritized_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/platform_color.h
diff --git a/cc/platform_color.h b/cc/platform_color.h
deleted file mode 100644
index add1933ce3525dd0992bd46ed42dec415785561b..0000000000000000000000000000000000000000
--- a/cc/platform_color.h
+++ /dev/null
@@ -1,61 +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_PLATFORM_COLOR_H_
-#define CC_PLATFORM_COLOR_H_
-
-#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
-#include "third_party/khronos/GLES2/gl2.h"
-#include "third_party/khronos/GLES2/gl2ext.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 GLenum BestTextureFormat(WebKit::WebGraphicsContext3D* context,
- bool supports_bgra8888) {
- GLenum texture_format = GL_RGBA;
- switch (Format()) {
- case SOURCE_FORMAT_RGBA8:
- break;
- case SOURCE_FORMAT_BGRA8:
- if (supports_bgra8888)
- texture_format = GL_BGRA_EXT;
- break;
- default:
- NOTREACHED();
- break;
- }
- return texture_format;
- }
-
- // Return true if the given texture format has the same component order
- // as the color on this platform.
- static bool SameComponentOrder(GLenum texture_format) {
- switch (Format()) {
- case SOURCE_FORMAT_RGBA8:
- return texture_format == GL_RGBA;
- case SOURCE_FORMAT_BGRA8:
- return texture_format == GL_BGRA_EXT;
- default:
- NOTREACHED();
- return false;
- }
- }
-};
-
-} // namespace cc
-
-#endif // CC_PLATFORM_COLOR_H_
« no previous file with comments | « cc/picture_pile_impl.cc ('k') | cc/prioritized_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698