Merge "Use TraceUtils.h from gui shared library." into sc-dev am: e81c22a2c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14688150 Change-Id: Ie5ca551f8b08ab8a380c665f2173aba881f453df
This commit is contained in:
@@ -24,10 +24,10 @@
|
||||
#include <GrDirectContext.h>
|
||||
#include <SkCanvas.h>
|
||||
#include <SkImage.h>
|
||||
#include <gui/TraceUtils.h>
|
||||
#include <utils/GLUtils.h>
|
||||
#include <utils/NdkUtils.h>
|
||||
#include <utils/Trace.h>
|
||||
#include <utils/TraceUtils.h>
|
||||
|
||||
#include <thread>
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <sync/sync.h>
|
||||
#include <system/window.h>
|
||||
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "DeferredLayerUpdater.h"
|
||||
#include "Properties.h"
|
||||
#include "hwui/Bitmap.h"
|
||||
@@ -28,7 +29,6 @@
|
||||
#include "utils/Color.h"
|
||||
#include "utils/MathUtils.h"
|
||||
#include "utils/NdkUtils.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
using namespace android::uirenderer::renderthread;
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
#include "DamageAccumulator.h"
|
||||
#include "pipeline/skia/SkiaDisplayList.h"
|
||||
#endif
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "utils/MathUtils.h"
|
||||
#include "utils/StringUtils.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
#include <SkPathOps.h>
|
||||
#include <algorithm>
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#include "renderthread/RenderThread.h"
|
||||
#endif
|
||||
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "utils/Macros.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
#include "utils/VectorDrawableUtils.h"
|
||||
|
||||
namespace android {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "AnimatedImageThread.h"
|
||||
#endif
|
||||
|
||||
#include "utils/TraceUtils.h"
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "pipeline/skia/SkiaUtils.h"
|
||||
|
||||
#include <SkPicture.h>
|
||||
|
||||
@@ -15,19 +15,19 @@
|
||||
*/
|
||||
|
||||
#define ATRACE_TAG ATRACE_TAG_VIEW
|
||||
#include "FontUtils.h"
|
||||
#include "GraphicsJNI.h"
|
||||
#include "fonts/Font.h"
|
||||
#include <nativehelper/ScopedPrimitiveArray.h>
|
||||
#include <nativehelper/ScopedUtfChars.h>
|
||||
#include "SkData.h"
|
||||
#include "SkTypeface.h"
|
||||
#include <gui/TraceUtils.h>
|
||||
#include <hwui/Typeface.h>
|
||||
#include <minikin/FontCollection.h>
|
||||
#include <minikin/FontFamily.h>
|
||||
#include <minikin/FontFileParser.h>
|
||||
#include <minikin/SystemFonts.h>
|
||||
#include <utils/TraceUtils.h>
|
||||
#include <nativehelper/ScopedPrimitiveArray.h>
|
||||
#include <nativehelper/ScopedUtfChars.h>
|
||||
#include "FontUtils.h"
|
||||
#include "GraphicsJNI.h"
|
||||
#include "SkData.h"
|
||||
#include "SkTypeface.h"
|
||||
#include "fonts/Font.h"
|
||||
|
||||
#include <mutex>
|
||||
#include <unordered_map>
|
||||
@@ -37,7 +37,6 @@
|
||||
#endif
|
||||
|
||||
using namespace android;
|
||||
using android::uirenderer::TraceUtils;
|
||||
|
||||
static inline Typeface* toTypeface(jlong ptr) {
|
||||
return reinterpret_cast<Typeface*>(ptr);
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <Properties.h>
|
||||
#include <RootRenderNode.h>
|
||||
#include <dlfcn.h>
|
||||
#include <gui/TraceUtils.h>
|
||||
#include <inttypes.h>
|
||||
#include <media/NdkImage.h>
|
||||
#include <media/NdkImageReader.h>
|
||||
@@ -39,7 +40,6 @@
|
||||
#include <utils/RefBase.h>
|
||||
#include <utils/StrongPointer.h>
|
||||
#include <utils/Timers.h>
|
||||
#include <utils/TraceUtils.h>
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#endif
|
||||
#include <TreeInfo.h>
|
||||
#include <effects/StretchEffect.h>
|
||||
#include <gui/TraceUtils.h>
|
||||
#include <hwui/Paint.h>
|
||||
#include <utils/TraceUtils.h>
|
||||
|
||||
namespace android {
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
#include "RenderNodeDrawable.h"
|
||||
#include <SkPaintFilterCanvas.h>
|
||||
#include "StretchMask.h"
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "RenderNode.h"
|
||||
#include "SkiaDisplayList.h"
|
||||
#include "StretchMask.h"
|
||||
#include "TransformCanvas.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
#include <include/effects/SkImageFilters.h>
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "ShaderCache.h"
|
||||
#include <GrDirectContext.h>
|
||||
#include <gui/TraceUtils.h>
|
||||
#include <log/log.h>
|
||||
#include <openssl/sha.h>
|
||||
#include <algorithm>
|
||||
@@ -23,7 +24,6 @@
|
||||
#include <thread>
|
||||
#include "FileBlobCache.h"
|
||||
#include "Properties.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
namespace android {
|
||||
namespace uirenderer {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "SkiaOpenGLPipeline.h"
|
||||
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "DeferredLayerUpdater.h"
|
||||
#include "LayerDrawable.h"
|
||||
#include "LightingInfo.h"
|
||||
@@ -27,7 +28,6 @@
|
||||
#include "renderthread/EglManager.h"
|
||||
#include "renderthread/Frame.h"
|
||||
#include "utils/GLUtils.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
#include <GLES3/gl3.h>
|
||||
|
||||
|
||||
@@ -31,13 +31,13 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "LightingInfo.h"
|
||||
#include "VectorDrawable.h"
|
||||
#include "thread/CommonPool.h"
|
||||
#include "tools/SkSharingProc.h"
|
||||
#include "utils/Color.h"
|
||||
#include "utils/String8.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
using namespace android::uirenderer::renderthread;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "SkiaVulkanPipeline.h"
|
||||
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "DeferredLayerUpdater.h"
|
||||
#include "LightingInfo.h"
|
||||
#include "Readback.h"
|
||||
@@ -25,7 +26,6 @@
|
||||
#include "VkInteropFunctorDrawable.h"
|
||||
#include "renderstate/RenderState.h"
|
||||
#include "renderthread/Frame.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
#include <SkSurface.h>
|
||||
#include <SkTypes.h>
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
#include <SkAndroidFrameworkUtils.h>
|
||||
#include <SkImage.h>
|
||||
#include <SkM44.h>
|
||||
#include <gui/TraceUtils.h>
|
||||
#include <utils/Color.h>
|
||||
#include <utils/Trace.h>
|
||||
#include <utils/TraceUtils.h>
|
||||
#include <vk/GrVkTypes.h>
|
||||
#include <thread>
|
||||
#include "renderthread/RenderThread.h"
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#include <GLES3/gl3.h>
|
||||
#include <gui/TraceUtils.h>
|
||||
#include <private/hwui/DrawGlInfo.h>
|
||||
#include <utils/Color.h>
|
||||
#include <utils/GLUtils.h>
|
||||
#include <utils/Trace.h>
|
||||
#include <utils/TraceUtils.h>
|
||||
|
||||
#include <thread>
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "../Properties.h"
|
||||
#include "AnimationContext.h"
|
||||
#include "Frame.h"
|
||||
@@ -39,7 +40,6 @@
|
||||
#include "thread/CommonPool.h"
|
||||
#include "utils/GLUtils.h"
|
||||
#include "utils/TimeUtils.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
#define TRIM_MEMORY_COMPLETE 80
|
||||
#define TRIM_MEMORY_UI_HIDDEN 20
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
#include "DrawFrameTask.h"
|
||||
|
||||
#include <gui/TraceUtils.h>
|
||||
#include <utils/Log.h>
|
||||
#include <utils/TraceUtils.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include "../DeferredLayerUpdater.h"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "RenderProxy.h"
|
||||
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "DeferredLayerUpdater.h"
|
||||
#include "DisplayList.h"
|
||||
#include "Properties.h"
|
||||
@@ -27,7 +28,6 @@
|
||||
#include "renderthread/RenderThread.h"
|
||||
#include "utils/Macros.h"
|
||||
#include "utils/TimeUtils.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
namespace android {
|
||||
namespace uirenderer {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "RenderThread.h"
|
||||
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "../HardwareBitmapUploader.h"
|
||||
#include "CanvasContext.h"
|
||||
#include "DeviceInfo.h"
|
||||
@@ -29,7 +30,6 @@
|
||||
#include "pipeline/skia/SkiaVulkanPipeline.h"
|
||||
#include "renderstate/RenderState.h"
|
||||
#include "utils/TimeUtils.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
#include <GrContextOptions.h>
|
||||
#include <gl/GrGLInterface.h>
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "Properties.h"
|
||||
#include "RenderThread.h"
|
||||
#include "pipeline/skia/ShaderCache.h"
|
||||
#include "renderstate/RenderState.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
namespace android {
|
||||
namespace uirenderer {
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
#include <SkSurface.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "VulkanManager.h"
|
||||
#include "utils/Color.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
namespace android {
|
||||
namespace uirenderer {
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <gui/TraceUtils.h>
|
||||
#include "AnimationContext.h"
|
||||
#include "RenderNode.h"
|
||||
#include "renderthread/RenderProxy.h"
|
||||
@@ -21,7 +22,6 @@
|
||||
#include "tests/common/TestContext.h"
|
||||
#include "tests/common/TestScene.h"
|
||||
#include "tests/common/scenes/TestSceneBase.h"
|
||||
#include "utils/TraceUtils.h"
|
||||
|
||||
#include <benchmark/benchmark.h>
|
||||
#include <gui/Surface.h>
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifndef TRACE_UTILS_H
|
||||
#define TRACE_UTILS_H
|
||||
|
||||
#include <cutils/trace.h>
|
||||
#include <utils/Trace.h>
|
||||
|
||||
#define ATRACE_FORMAT(fmt, ...) \
|
||||
TraceUtils::TraceEnder __traceEnder = \
|
||||
(TraceUtils::atraceFormatBegin(fmt, ##__VA_ARGS__), TraceUtils::TraceEnder())
|
||||
|
||||
#define ATRACE_FORMAT_BEGIN(fmt, ...) TraceUtils::atraceFormatBegin(fmt, ##__VA_ARGS__)
|
||||
|
||||
namespace android {
|
||||
namespace uirenderer {
|
||||
|
||||
class TraceUtils {
|
||||
public:
|
||||
class TraceEnder {
|
||||
public:
|
||||
~TraceEnder() { ATRACE_END(); }
|
||||
};
|
||||
|
||||
static void atraceFormatBegin(const char* fmt, ...) {
|
||||
if (CC_LIKELY(!ATRACE_ENABLED())) return;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
}; // class TraceUtils
|
||||
|
||||
} /* namespace uirenderer */
|
||||
} /* namespace android */
|
||||
|
||||
#endif /* TRACE_UTILS_H */
|
||||
Reference in New Issue
Block a user