summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-05-07 10:49:55 -0700
committerJohn Reck <jreck@google.com>2015-05-07 11:06:46 -0700
commita039182d6157bc0487df4ad8e373685c9dd7d662 (patch)
tree5646c6fe082f32147659a939f0aa74e232a3caca /libs/hwui
parentb59642bf49e8703ebd88532f06628ef5a7d8b006 (diff)
downloadframeworks_base-a039182d6157bc0487df4ad8e373685c9dd7d662.zip
frameworks_base-a039182d6157bc0487df4ad8e373685c9dd7d662.tar.gz
frameworks_base-a039182d6157bc0487df4ad8e373685c9dd7d662.tar.bz2
Delete a bunch of dead code
Rotation wasn't supported, so just nuke all the code around it. Fixes some unused field warnings Change-Id: Ic33d56ed3b42e3261bddc5007c5a029831254f83
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/AssetAtlas.cpp6
-rw-r--r--libs/hwui/AssetAtlas.h26
2 files changed, 6 insertions, 26 deletions
diff --git a/libs/hwui/AssetAtlas.cpp b/libs/hwui/AssetAtlas.cpp
index 882826e..2889d2f 100644
--- a/libs/hwui/AssetAtlas.cpp
+++ b/libs/hwui/AssetAtlas.cpp
@@ -112,9 +112,6 @@ private:
Texture* const mDelegate;
}; // struct DelegateTexture
-/**
- * TODO: This method does not take the rotation flag into account
- */
void AssetAtlas::createEntries(Caches& caches, int64_t* map, int count) {
const float width = float(mTexture->width);
const float height = float(mTexture->height);
@@ -128,7 +125,6 @@ void AssetAtlas::createEntries(Caches& caches, int64_t* map, int count) {
// pointers on 64 bit architectures.
const int x = static_cast<int>(map[i++]);
const int y = static_cast<int>(map[i++]);
- bool rotated = map[i++] > 0;
// Bitmaps should never be null, we're just extra paranoid
if (!pixelRef) continue;
@@ -142,7 +138,7 @@ void AssetAtlas::createEntries(Caches& caches, int64_t* map, int count) {
texture->width = pixelRef->info().width();
texture->height = pixelRef->info().height();
- Entry* entry = new Entry(pixelRef, x, y, rotated, texture, mapper, *this);
+ Entry* entry = new Entry(pixelRef, texture, mapper, *this);
texture->uvMapper = &entry->uvMapper;
mEntries.add(entry->pixelRef, entry);
diff --git a/libs/hwui/AssetAtlas.h b/libs/hwui/AssetAtlas.h
index 17c5281..f1cd0b4 100644
--- a/libs/hwui/AssetAtlas.h
+++ b/libs/hwui/AssetAtlas.h
@@ -45,8 +45,8 @@ class Image;
class AssetAtlas {
public:
/**
- * Entry representing the position and rotation of a
- * bitmap inside the atlas.
+ * Entry representing the texture and uvMapper of a PixelRef in the
+ * atlas
*/
class Entry {
public:
@@ -78,30 +78,15 @@ public:
SkPixelRef* pixelRef;
/**
- * Location of the bitmap inside the atlas, in pixels.
- */
- int x;
- int y;
-
- /**
- * If set, the bitmap is rotated 90 degrees (clockwise)
- * inside the atlas.
- */
- bool rotated;
-
- /**
* Atlas this entry belongs to.
*/
const AssetAtlas& atlas;
- Entry(SkPixelRef* pixelRef, int x, int y, bool rotated,
- Texture* texture, const UvMapper& mapper, const AssetAtlas& atlas)
+ Entry(SkPixelRef* pixelRef, Texture* texture, const UvMapper& mapper,
+ const AssetAtlas& atlas)
: texture(texture)
, uvMapper(mapper)
, pixelRef(pixelRef)
- , x(x)
- , y(y)
- , rotated(rotated)
, atlas(atlas) {
}
@@ -120,8 +105,7 @@ public:
* Initializes the atlas with the specified buffer and
* map. The buffer is a gralloc'd texture that will be
* used as an EGLImage. The map is a list of SkBitmap*
- * and their (x, y) positions as well as their rotation
- * flags.
+ * and their (x, y) positions
*
* This method returns immediately if the atlas is already
* initialized. To re-initialize the atlas, you must