Prevent renderers from drawing with unbound textures 68/51568/8
authorDavid Steele <david.steele@partner.samsung.com>
Tue, 10 Nov 2015 16:56:08 +0000 (16:56 +0000)
committerDavid Steele <david.steele@samsung.com>
Wed, 9 Mar 2016 15:24:53 +0000 (15:24 +0000)
commitc49500323470762c2d3f631babc9509bf072e987
tree1ed0ad5a9c7c4383fc43f3e8ecf24d0ce617271b
parent53f9bab9fed644838c81213143bf6983c2dfc0c1
Prevent renderers from drawing with unbound textures

Changed Texture::Bind to return success/failure instead of Created/NotCreated

If the texture is not created, e.g. a NativeTexture calling out to
NativeImageInterface::GlExtensionCreate() fails for some reason, then
the Bind call will now return false to indicate that it failed.

The renderers now check the result of the Bind call, and do not draw if it is
false. This prevents the screen showing black rectangles for unbound textures.

Change-Id: I8e4c81f43a8b73b05cccdbf7799cf5ef0c8722c4
Signed-off-by: David Steele <david.steele@samsung.com>
automated-tests/src/dali/dali-test-suite-utils/test-native-image.cpp
automated-tests/src/dali/dali-test-suite-utils/test-native-image.h
automated-tests/src/dali/utc-Dali-NativeImage.cpp
dali/internal/render/gl-resources/native-texture.cpp
dali/internal/render/gl-resources/texture-cache.cpp
dali/internal/render/gl-resources/texture-cache.h
dali/internal/render/gl-resources/texture.cpp
dali/internal/render/gl-resources/texture.h
dali/internal/render/renderers/render-renderer.cpp
dali/internal/render/renderers/render-renderer.h