std::unique_ptr::release just releases the ownership of the
managed object. To delete the object, std::unique_ptr::reset
function should be called.
Change-Id: If65f74085b1fc2be3a9fffc433326e0bcdb40ff3
Recent changes to mExtensions moved the initialization code from the
constructor to a separate function called load. Make sure to call
this function in the initExtensions function call.
Bug: 25615666
Change-Id: Ic016232c42afefd3b5bc3e4bd5c8428a11c454ad
Bug: 21753739
Includes a revert of 13d1b4ab10fbee5e81a2ba1ac59cfae1e51d3ef0
as that only supported EGL_EXT_buffer_age
Change-Id: Ia86a47d19e3355c067934d7764c330b640c6958d
Bug: 22676664
If a task is queued on a worker thread that is busy
processing a task AND a trim memory signal comes along
prior to the initial task being completed then the
tasks that were queued prior to the exit request will
never be processed.
This is bad, as when those futures are used later on, such
as in trying to delete them from the cache, they will block
waiting for the orphaned task to be finished.
Simple fix is to just never stop the worker threads. Increase
RAM usage slightly as we won't reclaim that stack space, but
this cost is fairly small
Change-Id: I818b011f9bc6ba06942fdad81c27656bd97b42d4
bug:19967854
Separate properties from Caches, into static, RenderThread-only class.
Also rewrites the means for java to set properties to correctly handle
threading, and adds an override for profile bars so that SysUi doesn't clutter
the screen with them.
Change-Id: I6e21a96065f52b9ecc49d1a126244804ba106fa9
Adds remaining missing overrides and nullptr usages, missed due to
an extreme failure in tool usage.
Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
Bug: 18317479
RenderNode::prepareSubTree calls prefetchAndMarkInUse
on every bitmapResoruce in the DisplayList. However,
this resulted in textures being uploaded for bitmaps
that would be drawn from the AssetAtlas instead.
To fix this we teach TextureCache about the AssetAtlas
so that calls to TextureCache return the Texture from
AssetAtlas if it exists. Thus usage of AssetAtlas
is now purely to allow for further optimizations via
draw merging instead of a requirement to get
any benefit at all.
Change-Id: I65282fa05bac46f4e93822b3467ffa0261ccf200
Bug: 17208461
* Switch Layer to be VirtualLightRefBase instead of
Caches' side-channel ref-counting
* Include active layers in gfxinfo dump
* Run gfxinfo dump on the correct thread
* Dump gfxinfo on Layer creation failure
Change-Id: I28d195699e2334518e215ab28c7a17355aee9678
Narrow the use of #include directives in hwui, replacing with forward
declarations where straightforward. Speeds compiles; doesn't do any
restructuring of code.
Change-Id: Icac2baffb5896f55d8c6718e9bd9d4bfa02d3ca0
bug:17441218
GLConsumer uses glBindTexture() directly instead of going through
Caches::bindTexture(). This can cause libhwui to draw with the wrong
texture bound in the following case which involves 2 TextureViews:
Frame 1:
GLConsumer::updateTexImage() calls glBindTexture(GL_TEXTURE_EXTERNAL_OES, 1)
HWUI renders TextureView A:
calls Caches::bindTexture(GL_TEXTURE_EXTERNAL_OES, 1) and draws
Frame 2:
GLConsumer::updateTexImage() calls glBindTexture(GL_TEXTURE_EXTERNAL_OES, 1)
GLConsumer::updateTexImage() calls glBindTexture(GL_TEXTURE_EXTERNAL_OES, 2)
HWUI renders TextureView A:
calls Caches::bindTexture(GL_TEXTURE_EXTERNAL_OES, 1) and draws
HWUI renders TextureView B:
calls Caches::bindTexture(GL_TEXTURE_EXTERNAL_OES, 2) and draws
In this case, HWUI will incorrectly draw TextureView A using texture 2 on
frame 2, because mBoundTextures[0]=1, even though the texture currently
bound to GL_TEXTURE_EXTERNAL_OES is 2.
Since GLConsumer is always used with a target of GL_TEXTURE_EXTERNAL_OES,
work around this problem by having mBoundTextures[] store only the
textures bound to the target GL_TEXTURE_2D. This is the common case
where the extra performance is needed. Since it's legal to have
different textures bound to GL_TEXTURE_2D and GL_TEXTURE_EXTERNAL_OES
on one texture unit, Caches::bindTexture() does not need to clear
mBoundTextures[mTextureUnit] when target != GL_TEXTURE_2D.
Change-Id: I8bc54ab8adcfacad7f3ed17a31236dc7a86c967a
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Bug: 17208461
There's a potential race condition between HardwareRenderer.destroy()
being called (which calls destroyCanvasAndSurface()) and the renderer
being finalized (which is what calls freePrefetchedLayers), during which
time it's possible we get a TRIM_MEMORY_COMPLETE and destroy the EGL
context.
Fix this race condition by moving stopDrawing() and freePrefetchedLayers()
into destroyCanvasAndSurface() where they should have been in the first
place.
Also, if we hit the assertion failure, dump the current state of
Caches to try and provide more context for the failure.
Change-Id: Ife0ba3562041e8b08e87e3e13640472b3004eed6
bug:14083128
Moves all of the font transform management into
OpenGLRenderer::findBestFontTransform(), and now simply passes down
final rasterization transforms into the FontRenderer.
Change-Id: Ie02752e6af863347b142367c7d628db5f9fc2998
Issue: When the layer of previous frame is destroyed, it doesn't clear the
texture id in mBoundTextures[mTextureUnit], so in the next frame, if
glGenTexture returns same texture ID of the previous frame,
the new texture is not bound.
CRs-fixed: 671736
Change-Id: Ifc5fd2115fb1863b3c006ab14b0faabeaeb4eab4