From 6c321b272c52a77db99d893a63fd06d483ca3bec Mon Sep 17 00:00:00 2001 From: Rajulu Ponnada Date: Thu, 13 Sep 2012 15:19:05 -0700 Subject: [PATCH] hardware/qcom/display: avoiding tile rendering when render target changes for the same fbo tile rendering avoided when switching between same FBOs Change-Id: I66e3008652470f5cabd26585ece8ef7a783fd0c2 --- libtilerenderer/tilerenderer.cpp | 12 ++++++------ libtilerenderer/tilerenderer.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libtilerenderer/tilerenderer.cpp b/libtilerenderer/tilerenderer.cpp index 7ecd055..710fe75 100644 --- a/libtilerenderer/tilerenderer.cpp +++ b/libtilerenderer/tilerenderer.cpp @@ -247,11 +247,11 @@ void TileRenderer::endTileRendering() { #endif } -void TileRenderer::startTiling(int fbo, int left, int top, +void TileRenderer::startTiling(int fbo, int prevfbo, int left, int top, int right, int bottom, int width, int height, bool preserve) { #ifdef QCOM_APP_TILE_RENDER - if (!isReady() || isTiled()) + if ((fbo == prevfbo) || !isReady() || isTiled()) return; mTileCacheMgr.set(fbo, left, top, right, bottom, width, height); @@ -267,13 +267,13 @@ void TileRenderer::startTiling(int fbo, int left, int top, return; } -void TileRenderer::startTiling(int fbo, bool preserve) { +void TileRenderer::startTiling(int fbo, int prevfbo, bool preserve) { #ifdef QCOM_APP_TILE_RENDER int left, top; int right, bottom; int width, height; - if (!isReady() || isTiled()) + if ((fbo == prevfbo) || !isReady() || isTiled()) return; mTileCacheMgr.peek(fbo, left, top, right, bottom, width, height); @@ -287,9 +287,9 @@ void TileRenderer::startTiling(int fbo, bool preserve) { return; } -void TileRenderer::endTiling(int fbo, bool bClear) { +void TileRenderer::endTiling(int fbo, int nextfbo, bool bClear) { #ifdef QCOM_APP_TILE_RENDER - if (!isTiled()) { + if ((fbo == nextfbo) || !isTiled()) { return; } TILE_RENDERER_LOGD("TileRenderer::end fbo=%d", fbo); diff --git a/libtilerenderer/tilerenderer.h b/libtilerenderer/tilerenderer.h index 307bdfe..679508d 100644 --- a/libtilerenderer/tilerenderer.h +++ b/libtilerenderer/tilerenderer.h @@ -99,12 +99,12 @@ public: void startTileRendering(int left, int top, int right, int bottom, int width, int height); - void startTiling(int fbo, int left = 0, int top = 0, int right = 0, + void startTiling(int fbo, int prevfbo, int left = 0, int top = 0, int right = 0, int bottom = 0, int width = 0, int height = 0, bool preserve = false); - void startTiling(int fbo, bool preserve); + void startTiling(int fbo, int prevfbo, bool preserve); void endTileRendering(); - void endTiling(int fbo, bool bClear = false); + void endTiling(int fbo, int nextfbo, bool bClear = false); void clearCache(int fbo); private: int startTilingInternal(int left, int top, int right,