diff options
author | 2012-02-23 19:27:23 -0800 | |
---|---|---|
committer | 2012-02-27 17:50:35 -0800 | |
commit | a85ca37c8469b2a54c95db0bb724017fd08c5688 (patch) | |
tree | 2c2a798a4e0927bfab5572c8ccdc9851fb950d00 /services/surfaceflinger/Layer.cpp | |
parent | 6835237f6f55d8a7c7b43b8e0f174f5ea258bfee (diff) |
Add tracing to various graphics components.
This change adds ATRACE call tracing to BufferQueue,
SurfaceTextureClient, SurfaceTexture, SurfaceFlinger, Layer, and EGL.
Change-Id: I9d75ed26f5a3f0d1af635da38289520134cfbbb7
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index c15fdbc1ecef..43acce823171 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -14,6 +14,8 @@ * limitations under the License. */ +#define ATRACE_TAG ATRACE_TAG_GRAPHICS + #include <stdlib.h> #include <stdint.h> #include <sys/types.h> @@ -26,6 +28,7 @@ #include <utils/Errors.h> #include <utils/Log.h> #include <utils/StopWatch.h> +#include <utils/Trace.h> #include <ui/GraphicBuffer.h> #include <ui/PixelFormat.h> @@ -267,6 +270,8 @@ void Layer::setPerFrameData(hwc_layer_t* hwcl) { void Layer::onDraw(const Region& clip) const { + ATRACE_CALL(); + if (CC_UNLIKELY(mActiveBuffer == 0)) { // the texture has not been created yet, this Layer has // in fact never been drawn into. This happens frequently with @@ -365,6 +370,8 @@ bool Layer::isProtected() const uint32_t Layer::doTransaction(uint32_t flags) { + ATRACE_CALL(); + const Layer::State& front(drawingState()); const Layer::State& temp(currentState()); @@ -418,6 +425,8 @@ bool Layer::onPreComposition() { void Layer::lockPageFlip(bool& recomputeVisibleRegions) { + ATRACE_CALL(); + if (mQueuedFrames > 0) { // if we've already called updateTexImage() without going through @@ -540,6 +549,8 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions) void Layer::unlockPageFlip( const Transform& planeTransform, Region& outDirtyRegion) { + ATRACE_CALL(); + Region postedRegion(mPostedDirtyRegion); if (!postedRegion.isEmpty()) { mPostedDirtyRegion.clear(); |