Fix issue with bitmap uploading

Bug: 13912749

Change-Id: Ic23fa1d280118dc93dc2716a4a24cc0bbbdca595
This commit is contained in:
John Reck
2014-04-11 19:15:05 -07:00
parent db8b130a19
commit 860d155f86
14 changed files with 131 additions and 66 deletions

View File

@@ -85,7 +85,6 @@ void DrawFrameTask::postAndWait(RenderThread* renderThread) {
void DrawFrameTask::run() {
ATRACE_NAME("DrawFrame");
// canUnblockUiThread is temporary until WebView has a solution for syncing frame state
bool canUnblockUiThread = syncFrameState();
// Grab a copy of everything we need
@@ -105,17 +104,20 @@ void DrawFrameTask::run() {
}
}
static void prepareTreeInfo(TreeInfo& info) {
info.prepareTextures = true;
}
bool DrawFrameTask::syncFrameState() {
ATRACE_CALL();
bool hasFunctors = false;
mContext->processLayerUpdates(&mLayers, &hasFunctors);
TreeInfo info = {0};
mContext->makeCurrent();
Caches::getInstance().textureCache.resetMarkInUse();
TreeInfo info;
prepareTreeInfo(info);
mContext->processLayerUpdates(&mLayers, info);
mRenderNode->prepareTree(info);
hasFunctors |= info.hasFunctors;
return !hasFunctors;
// If prepareTextures is false, we ran out of texture cache space
return !info.hasFunctors && info.prepareTextures;
}
void DrawFrameTask::unblockUiThread() {