diff options
Diffstat (limited to 'libs/hwui/GpuMemoryTracker.cpp')
-rw-r--r-- | libs/hwui/GpuMemoryTracker.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/libs/hwui/GpuMemoryTracker.cpp b/libs/hwui/GpuMemoryTracker.cpp index a52ec8738015..612bfde1a3fa 100644 --- a/libs/hwui/GpuMemoryTracker.cpp +++ b/libs/hwui/GpuMemoryTracker.cpp @@ -14,11 +14,11 @@ * limitations under the License. */ -#include "utils/StringUtils.h" #include "Texture.h" +#include "utils/StringUtils.h" -#include <cutils/compiler.h> #include <GpuMemoryTracker.h> +#include <cutils/compiler.h> #include <utils/Trace.h> #include <array> #include <sstream> @@ -33,9 +33,7 @@ pthread_t gGpuThread = 0; #define NUM_TYPES static_cast<int>(GpuObjectType::TypeCount) const char* TYPE_NAMES[] = { - "Texture", - "OffscreenBuffer", - "Layer", + "Texture", "OffscreenBuffer", "Layer", }; struct TypeStats { @@ -55,21 +53,22 @@ void GpuMemoryTracker::notifySizeChanged(int newSize) { void GpuMemoryTracker::startTrackingObject() { auto result = gObjectSet.insert(this); LOG_ALWAYS_FATAL_IF(!result.second, - "startTrackingObject() on %p failed, already being tracked!", this); + "startTrackingObject() on %p failed, already being tracked!", this); gObjectStats[static_cast<int>(mType)].count++; } void GpuMemoryTracker::stopTrackingObject() { size_t removed = gObjectSet.erase(this); - LOG_ALWAYS_FATAL_IF(removed != 1, - "stopTrackingObject removed %zd, is %p not being tracked?", - removed, this); + LOG_ALWAYS_FATAL_IF(removed != 1, "stopTrackingObject removed %zd, is %p not being tracked?", + removed, this); gObjectStats[static_cast<int>(mType)].count--; } void GpuMemoryTracker::onGpuContextCreated() { - LOG_ALWAYS_FATAL_IF(gGpuThread != 0, "We already have a gpu thread? " - "current = %lu, gpu thread = %lu", pthread_self(), gGpuThread); + LOG_ALWAYS_FATAL_IF(gGpuThread != 0, + "We already have a gpu thread? " + "current = %lu, gpu thread = %lu", + pthread_self(), gGpuThread); gGpuThread = pthread_self(); } @@ -124,8 +123,8 @@ void GpuMemoryTracker::onFrameCompleted() { if (obj->objectType() == GpuObjectType::Texture) { const Texture* texture = static_cast<Texture*>(obj); if (texture->cleanup) { - ALOGE("Leaked texture marked for cleanup! id=%u, size %ux%u", - texture->id(), texture->width(), texture->height()); + ALOGE("Leaked texture marked for cleanup! id=%u, size %ux%u", texture->id(), + texture->width(), texture->height()); freeList.push_back(texture); } } @@ -136,5 +135,5 @@ void GpuMemoryTracker::onFrameCompleted() { } } -} // namespace uirenderer -} // namespace android; +} // namespace uirenderer +} // namespace android; |