summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderProxy.cpp
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2017-11-14 12:31:11 -0800
committerXin Li <delphij@google.com>2017-11-14 12:31:11 -0800
commit220871a697290529278ed16db508eda8e12f3fc7 (patch)
treebc13101b63c6fe39a9d92706ecb7ded7f98f5a9c /libs/hwui/renderthread/RenderProxy.cpp
parent802f191b2b84a1b1b82c7f6f3268846084b35dfb (diff)
parent98e12851336b7db16e583f9afac63ecc97465980 (diff)
Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master. Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7 Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.cpp')
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp40
1 files changed, 21 insertions, 19 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 80c2955400d8..9048bd14b35c 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -21,6 +21,7 @@
#include "Properties.h"
#include "Readback.h"
#include "Rect.h"
+#include "pipeline/skia/VectorDrawableAtlas.h"
#include "renderthread/CanvasContext.h"
#include "renderthread/EglManager.h"
#include "renderthread/RenderTask.h"
@@ -427,12 +428,12 @@ CREATE_BRIDGE4(dumpProfileInfo, CanvasContext* context, RenderThread* thread,
if (args->dumpFlags & DumpFlags::FrameStats) {
args->context->dumpFrames(args->fd);
}
+ if (args->dumpFlags & DumpFlags::JankStats) {
+ args->thread->globalProfileData()->dump(args->fd);
+ }
if (args->dumpFlags & DumpFlags::Reset) {
args->context->resetFrameStats();
}
- if (args->dumpFlags & DumpFlags::JankStats) {
- args->thread->jankTracker().dump(args->fd);
- }
return nullptr;
}
@@ -458,7 +459,7 @@ void RenderProxy::resetProfileInfo() {
CREATE_BRIDGE2(frameTimePercentile, RenderThread* thread, int percentile) {
return reinterpret_cast<void*>(static_cast<uintptr_t>(
- args->thread->jankTracker().findPercentile(args->percentile)));
+ args->thread->globalProfileData()->findPercentile(args->percentile)));
}
uint32_t RenderProxy::frameTimePercentile(int p) {
@@ -483,7 +484,7 @@ void RenderProxy::dumpGraphicsMemory(int fd) {
}
CREATE_BRIDGE2(setProcessStatsBuffer, RenderThread* thread, int fd) {
- args->thread->jankTracker().switchStorageToAshmem(args->fd);
+ args->thread->globalProfileData().switchStorageToAshmem(args->fd);
close(args->fd);
return nullptr;
}
@@ -497,7 +498,7 @@ void RenderProxy::setProcessStatsBuffer(int fd) {
}
CREATE_BRIDGE1(rotateProcessStatsBuffer, RenderThread* thread) {
- args->thread->jankTracker().rotateStorage();
+ args->thread->globalProfileData().rotateStorage();
return nullptr;
}
@@ -550,20 +551,8 @@ void RenderProxy::drawRenderNode(RenderNode* node) {
staticPostAndWait(task);
}
-CREATE_BRIDGE5(setContentDrawBounds, CanvasContext* context, int left, int top,
- int right, int bottom) {
- args->context->setContentDrawBounds(args->left, args->top, args->right, args->bottom);
- return nullptr;
-}
-
void RenderProxy::setContentDrawBounds(int left, int top, int right, int bottom) {
- SETUP_TASK(setContentDrawBounds);
- args->context = mContext;
- args->left = left;
- args->top = top;
- args->right = right;
- args->bottom = bottom;
- staticPostAndWait(task);
+ mDrawFrameTask.setContentDrawBounds(left, top, right, bottom);
}
CREATE_BRIDGE1(serializeDisplayListTree, CanvasContext* context) {
@@ -718,6 +707,19 @@ void RenderProxy::post(RenderTask* task) {
mRenderThread.queue(task);
}
+CREATE_BRIDGE1(repackVectorDrawableAtlas, RenderThread* thread) {
+ args->thread->cacheManager().acquireVectorDrawableAtlas()->repackIfNeeded(
+ args->thread->getGrContext());
+ return nullptr;
+}
+
+void RenderProxy::repackVectorDrawableAtlas() {
+ RenderThread& thread = RenderThread::getInstance();
+ SETUP_TASK(repackVectorDrawableAtlas);
+ args->thread = &thread;
+ thread.queue(task);
+}
+
void* RenderProxy::postAndWait(MethodInvokeRenderTask* task) {
void* retval;
task->setReturnPtr(&retval);