summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/TransferQueue.cpp
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2011-09-02 10:54:20 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2011-09-06 17:05:42 -0700
commit971c16ea709cb4f93e0327431ea27a920d5ad1d2 (patch)
tree78a1d2102af58da5eed8c093863137567d0b6980 /Source/WebCore/platform/graphics/android/TransferQueue.cpp
parented544a3dc0117e0f1e554b44016cd6031dbc2fb5 (diff)
downloadexternal_webkit-971c16ea709cb4f93e0327431ea27a920d5ad1d2.zip
external_webkit-971c16ea709cb4f93e0327431ea27a920d5ad1d2.tar.gz
external_webkit-971c16ea709cb4f93e0327431ea27a920d5ad1d2.tar.bz2
The CPU code path for uploading the textures
This is just for debugging anything related to the driver/HW. Change-Id: I26757f8259ec6b6c2406f78bf7aa9c5f527e31e7
Diffstat (limited to 'Source/WebCore/platform/graphics/android/TransferQueue.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/TransferQueue.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/TransferQueue.cpp b/Source/WebCore/platform/graphics/android/TransferQueue.cpp
index 851d02c..095d014 100644
--- a/Source/WebCore/platform/graphics/android/TransferQueue.cpp
+++ b/Source/WebCore/platform/graphics/android/TransferQueue.cpp
@@ -260,9 +260,15 @@ void TransferQueue::updateDirtyBaseTiles()
continue;
}
+#if DEBUG_TRANSFER_USING_CPU_UPLOAD
+ // Here we just need to upload the bitmap content to the GL Texture
+ GLUtils::updateTextureWithBitmap(destTexture->m_ownTextureId, 0, 0,
+ m_transferQueue[index].bitmap);
+#else
blitTileFromQueue(m_fboID, destTexture,
m_sharedSurfaceTextureId,
m_sharedSurfaceTexture->getCurrentTextureTarget());
+#endif
// After the base tile copied into the GL texture, we need to
// update the texture's info such that at draw time, readyFor
@@ -335,6 +341,9 @@ void TransferQueue::updateQueueWithBitmap(const TileRenderInfo* renderInfo,
m_transferQueueItemLocks.lock();
// b) After update the Surface Texture, now udpate the transfer queue info.
addItemInTransferQueue(renderInfo);
+#if DEBUG_TRANSFER_USING_CPU_UPLOAD
+ bitmap.copyTo(&(m_transferQueue[m_transferQueueIndex].bitmap), bitmap.config());
+#endif
m_transferQueueItemLocks.unlock();
XLOG("Bitmap updated x, y %d %d, baseTile %p",
renderInfo->x, renderInfo->y, renderInfo->baseTile);