summaryrefslogtreecommitdiffstats
path: root/libpixelflinger
diff options
context:
space:
mode:
authorKévin PETIT <kevin.petit@arm.com>2014-02-24 14:20:37 +0000
committerKévin PETIT <kevin.petit@arm.com>2014-02-26 11:39:13 +0000
commitc2659e72d7723f8dcb8659a1cb1d8ff3d6edae88 (patch)
tree1f26f278af56222a5b56ce8b0caf1160cc03c045 /libpixelflinger
parentebb46d76e4bf4ee4f34b42709ea69cce07e3e322 (diff)
downloadsystem_core-c2659e72d7723f8dcb8659a1cb1d8ff3d6edae88.zip
system_core-c2659e72d7723f8dcb8659a1cb1d8ff3d6edae88.tar.gz
system_core-c2659e72d7723f8dcb8659a1cb1d8ff3d6edae88.tar.bz2
Fix the handling of CodeCache return codes in pixelflinger
The error condition was not correctly detected: an error was reported by checking that the index returned by CodeCache::cache was non-zero. This did not work because this function can return a positive value on success. Change-Id: I1f90125ee62ab277b80da4dfb341733cd6e8e86a Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Diffstat (limited to 'libpixelflinger')
-rw-r--r--libpixelflinger/scanline.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpixelflinger/scanline.cpp b/libpixelflinger/scanline.cpp
index cd78713..cb2b811 100644
--- a/libpixelflinger/scanline.cpp
+++ b/libpixelflinger/scanline.cpp
@@ -408,10 +408,10 @@ static void pick_scanline(context_t* c)
GGLAssembler assembler( new ArmToArm64Assembler(a) );
#endif
// generate the scanline code for the given needs
- int err = assembler.scanline(c->state.needs, c);
+ bool err = assembler.scanline(c->state.needs, c) != 0;
if (ggl_likely(!err)) {
// finally, cache this assembly
- err = gCodeCache.cache(a->key(), a);
+ err = gCodeCache.cache(a->key(), a) < 0;
}
if (ggl_unlikely(err)) {
ALOGE("error generating or caching assembly. Reverting to NOP.");