diff options
| author | 2013-01-08 17:38:15 -0800 | |
|---|---|---|
| committer | 2013-01-08 17:38:15 -0800 | |
| commit | 19d4f1806a953b87435a2bb6fd8e738424e94003 (patch) | |
| tree | ab561da75ff49699432723e2904a89d5cda534e2 /libs/hwui/LayerCache.cpp | |
| parent | 1a9853fef502ef4dac48476b8b588650ae5db4ce (diff) | |
| parent | c88c60bed1fdf5b84cc16905c8743453203c19a5 (diff) | |
resolved conflicts for merge of c88c60be to master-chromium
Change-Id: I3b4b42443312068e942aa779dfdc928afa7569fd
Diffstat (limited to 'libs/hwui/LayerCache.cpp')
| -rw-r--r-- | libs/hwui/LayerCache.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/LayerCache.cpp b/libs/hwui/LayerCache.cpp index ce74ceec1b27..cfc5b04f2183 100644 --- a/libs/hwui/LayerCache.cpp +++ b/libs/hwui/LayerCache.cpp @@ -67,6 +67,14 @@ void LayerCache::setMaxSize(uint32_t maxSize) { // Caching /////////////////////////////////////////////////////////////////////////////// +int LayerCache::LayerEntry::compare(const LayerCache::LayerEntry& lhs, + const LayerCache::LayerEntry& rhs) { + int deltaInt = int(lhs.mWidth) - int(rhs.mWidth); + if (deltaInt != 0) return deltaInt; + + return int(lhs.mHeight) - int(rhs.mHeight); +} + void LayerCache::deleteLayer(Layer* layer) { if (layer) { LAYER_LOGD("Destroying layer %dx%d, fbo %d", layer->getWidth(), layer->getHeight(), |