summaryrefslogtreecommitdiff
path: root/libs/hwui/LayerCache.h
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2013-01-18 16:42:51 -0800
committer Romain Guy <romainguy@google.com> 2013-01-18 16:42:51 -0800
commit2055abaa0a590c35e27e1ae2e7d7cfccdfb98b59 (patch)
tree1e302d08b6aa3714048a4d8435aa44f155c998c9 /libs/hwui/LayerCache.h
parentf25febf01453733e8bdd1ac241ecd9d3bcbef475 (diff)
Allow layers with a stencil buffer to be resized on the fly
Bug #7146141 This change moves the resizeLayer() from LayerCache (where it should never have been anyway) to Layer. This makes a little more sense. Change-Id: I8b2f9c19c558e738405a58b9e71ec5799fc6be88
Diffstat (limited to 'libs/hwui/LayerCache.h')
-rw-r--r--libs/hwui/LayerCache.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/libs/hwui/LayerCache.h b/libs/hwui/LayerCache.h
index fc2cd9104804..7720b4232ae9 100644
--- a/libs/hwui/LayerCache.h
+++ b/libs/hwui/LayerCache.h
@@ -72,17 +72,6 @@ public:
* Clears the cache. This causes all layers to be deleted.
*/
void clear();
- /**
- * Resize the specified layer if needed.
- *
- * @param layer The layer to resize
- * @param width The new width of the layer
- * @param height The new height of the layer
- *
- * @return True if the layer was resized or nothing happened, false if
- * a failure occurred during the resizing operation
- */
- bool resize(Layer* layer, const uint32_t width, const uint32_t height);
/**
* Sets the maximum size of the cache in bytes.
@@ -108,8 +97,8 @@ public:
}
LayerEntry(const uint32_t layerWidth, const uint32_t layerHeight): mLayer(NULL) {
- mWidth = uint32_t(ceilf(layerWidth / float(LAYER_SIZE)) * LAYER_SIZE);
- mHeight = uint32_t(ceilf(layerHeight / float(LAYER_SIZE)) * LAYER_SIZE);
+ mWidth = Layer::computeIdealWidth(layerWidth);
+ mHeight = Layer::computeIdealHeight(layerHeight);
}
LayerEntry(Layer* layer):