diff options
author | Chris Craik <ccraik@google.com> | 2014-11-20 16:38:06 -0800 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2014-11-20 16:38:06 -0800 |
commit | f2235b6a48db2e16b52711570bf2a0d0cb0b0d90 (patch) | |
tree | 159f121d1330bba957764704de13720e785f3e3b /libs/hwui/OpenGLRenderer.cpp | |
parent | cd24a6d70b54c79605e51fcc6a249313e9c25a51 (diff) | |
parent | 57b641a2ed87f2827399c363053436cba88bee75 (diff) | |
download | frameworks_base-f2235b6a48db2e16b52711570bf2a0d0cb0b0d90.zip frameworks_base-f2235b6a48db2e16b52711570bf2a0d0cb0b0d90.tar.gz frameworks_base-f2235b6a48db2e16b52711570bf2a0d0cb0b0d90.tar.bz2 |
resolve merge conflicts of 57b641a to lmp-mr1-dev-plus-aosp.
Change-Id: I1be708f5a0cd4d64021a57f1063d54330f1d2d7e
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rwxr-xr-x | libs/hwui/OpenGLRenderer.cpp | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 36d1068..adee9c1 100755 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -42,6 +42,7 @@ #include "ShadowTessellator.h" #include "SkiaShader.h" #include "utils/GLUtils.h" +#include "utils/TraceUtils.h" #include "Vector.h" #include "VertexBuffer.h" @@ -51,21 +52,6 @@ #define EVENT_LOGD(...) #endif -static void atraceFormatBegin(const char* fmt, ...) { - const int BUFFER_SIZE = 256; - va_list ap; - char buf[BUFFER_SIZE]; - - va_start(ap, fmt); - vsnprintf(buf, BUFFER_SIZE, fmt, ap); - va_end(ap); - - ATRACE_BEGIN(buf); -} - -#define ATRACE_FORMAT_BEGIN(fmt, ...) \ - if (CC_UNLIKELY(ATRACE_ENABLED())) atraceFormatBegin(fmt, ##__VA_ARGS__) - namespace android { namespace uirenderer { @@ -466,7 +452,6 @@ void OpenGLRenderer::renderOverdraw() { bool OpenGLRenderer::updateLayer(Layer* layer, bool inFrame) { if (layer->deferredUpdateScheduled && layer->renderer && layer->renderNode.get() && layer->renderNode->isRenderable()) { - ATRACE_CALL(); if (inFrame) { endTiling(); @@ -523,20 +508,10 @@ void OpenGLRenderer::flushLayers() { int count = mLayerUpdates.size(); if (count > 0) { startMark("Apply Layer Updates"); - char layerName[12]; // Note: it is very important to update the layers in order for (int i = 0; i < count; i++) { - Layer* layer = mLayerUpdates.itemAt(i).get(); - - sprintf(layerName, "Layer #%d", i); - startMark(layerName); - ATRACE_FORMAT_BEGIN("flushLayer %ux%u", layer->getWidth(), layer->getHeight()); - - layer->flush(); - - ATRACE_END(); - endMark(); + mLayerUpdates.itemAt(i)->flush(); } mLayerUpdates.clear(); @@ -573,7 +548,7 @@ void OpenGLRenderer::cancelLayerUpdate(Layer* layer) { } void OpenGLRenderer::flushLayerUpdates() { - ATRACE_CALL(); + ATRACE_NAME("Update HW Layers"); syncState(); updateLayers(); flushLayers(); |