Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 591a824c authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Add layer/texture creation tracing" into lmp-dev

parents b5b3a1d3 ec4cefc1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -88,6 +88,8 @@ bool Layer::resize(const uint32_t width, const uint32_t height) {
        return true;
    }

    ATRACE_NAME("resizeLayer");

    const uint32_t maxTextureSize = caches.maxTextureSize;
    if (desiredWidth > maxTextureSize || desiredHeight > maxTextureSize) {
        ALOGW("Layer exceeds max. dimensions supported by the GPU (%dx%d, max=%dx%d)",
+3 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */

#define LOG_TAG "OpenGLRenderer"
#define ATRACE_TAG ATRACE_TAG_VIEW

#include <ui/Rect.h>

@@ -184,6 +185,7 @@ void LayerRenderer::generateMesh() {
///////////////////////////////////////////////////////////////////////////////

Layer* LayerRenderer::createRenderLayer(RenderState& renderState, uint32_t width, uint32_t height) {
    ATRACE_CALL();
    LAYER_RENDERER_LOGD("Requesting new render layer %dx%d", width, height);

    Caches& caches = Caches::getInstance();
@@ -309,6 +311,7 @@ void LayerRenderer::updateTextureLayer(Layer* layer, uint32_t width, uint32_t he

void LayerRenderer::destroyLayer(Layer* layer) {
    if (layer) {
        ATRACE_CALL();
        LAYER_RENDERER_LOGD("Recycling layer, %dx%d fbo = %d",
                layer->getWidth(), layer->getHeight(), layer->getFbo());

+3 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */

#define LOG_TAG "OpenGLRenderer"
#define ATRACE_TAG ATRACE_TAG_VIEW

#include <GLES2/gl2.h>

@@ -265,6 +266,8 @@ void TextureCache::generateTexture(const SkBitmap* bitmap, Texture* texture, boo
        return;
    }

    ATRACE_CALL();

    // We could also enable mipmapping if both bitmap dimensions are powers
    // of 2 but we'd have to deal with size changes. Let's keep this simple
    const bool canMipMap = Extensions::getInstance().hasNPot();