summaryrefslogtreecommitdiffstats
path: root/include/ui
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-07-25 19:24:31 -0700
committerMathias Agopian <mathias@google.com>2013-07-25 19:24:31 -0700
commit5773d3f5b2694c647e010246dff99acc70131289 (patch)
treed872f3545b5bc566acbf77a39b72207afa6e7e9a /include/ui
parent1fe854f6788f6fe9177fcca85185d13ba37d1911 (diff)
downloadframeworks_native-5773d3f5b2694c647e010246dff99acc70131289.zip
frameworks_native-5773d3f5b2694c647e010246dff99acc70131289.tar.gz
frameworks_native-5773d3f5b2694c647e010246dff99acc70131289.tar.bz2
get rid of PixelFormatInfo and simplify things
Change-Id: I025a362cc12d5b9b794fac14be500e25aab65396
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/DisplayInfo.h2
-rw-r--r--include/ui/PixelFormat.h56
2 files changed, 2 insertions, 56 deletions
diff --git a/include/ui/DisplayInfo.h b/include/ui/DisplayInfo.h
index c3a4d6b..2853e06 100644
--- a/include/ui/DisplayInfo.h
+++ b/include/ui/DisplayInfo.h
@@ -34,8 +34,6 @@ struct DisplayInfo {
uint8_t orientation;
bool secure;
uint8_t reserved[2];
- // TODO: this needs to go away (currently needed only by webkit)
- PixelFormatInfo pixelFormatInfo;
};
/* Display orientations as defined in Surface.java and ISurfaceComposer.h. */
diff --git a/include/ui/PixelFormat.h b/include/ui/PixelFormat.h
index 7b3a6de..d06728b 100644
--- a/include/ui/PixelFormat.h
+++ b/include/ui/PixelFormat.h
@@ -67,60 +67,8 @@ enum {
typedef int32_t PixelFormat;
-struct PixelFormatInfo {
- enum {
- INDEX_ALPHA = 0,
- INDEX_RED = 1,
- INDEX_GREEN = 2,
- INDEX_BLUE = 3
- };
-
- enum { // components
- ALPHA = 1,
- RGB = 2,
- RGBA = 3,
- L = 4,
- LA = 5,
- OTHER = 0xFF
- };
-
- struct szinfo {
- uint8_t h;
- uint8_t l;
- };
-
- inline PixelFormatInfo() : version(sizeof(PixelFormatInfo)) { }
- size_t getScanlineSize(unsigned int width) const;
- size_t getSize(size_t ci) const {
- return (ci <= 3) ? (cinfo[ci].h - cinfo[ci].l) : 0;
- }
- size_t version;
- PixelFormat format;
- size_t bytesPerPixel;
- size_t bitsPerPixel;
- union {
- szinfo cinfo[4];
- struct {
- uint8_t h_alpha;
- uint8_t l_alpha;
- uint8_t h_red;
- uint8_t l_red;
- uint8_t h_green;
- uint8_t l_green;
- uint8_t h_blue;
- uint8_t l_blue;
- };
- };
- uint8_t components;
- uint8_t reserved0[3];
- uint32_t reserved1;
-};
-
-// Consider caching the results of these functions are they're not
-// guaranteed to be fast.
-ssize_t bytesPerPixel(PixelFormat format);
-ssize_t bitsPerPixel(PixelFormat format);
-status_t getPixelFormatInfo(PixelFormat format, PixelFormatInfo* info);
+ssize_t bytesPerPixel(PixelFormat format);
+ssize_t bitsPerPixel(PixelFormat format);
}; // namespace android