diff options
author | John Reck <jreck@google.com> | 2018-04-09 09:41:29 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2018-04-09 14:50:40 -0700 |
commit | 617673f83f30a36eecd429df586e5ef6598116e1 (patch) | |
tree | da52e88529e4e5e992243483431003d87fc73684 /libs/hwui/renderthread/CanvasContext.cpp | |
parent | 325f7284d9b45d1a673b69dc8bf64d4d33b32305 (diff) |
Remove dead code
Remove an old protobuf serialization experiement, skp capture
does this better
Test: builds
Change-Id: Icd875eabee6b517729f901841e48e579d0e8de4d
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index f4d8051466f0..0e4b6f9e09be 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -29,7 +29,6 @@ #include "pipeline/skia/SkiaOpenGLPipeline.h" #include "pipeline/skia/SkiaPipeline.h" #include "pipeline/skia/SkiaVulkanPipeline.h" -#include "protos/hwui.pb.h" #include "renderstate/RenderState.h" #include "renderstate/Stencil.h" #include "utils/GLUtils.h" @@ -37,7 +36,6 @@ #include "../Properties.h" #include <cutils/properties.h> -#include <google/protobuf/io/zero_copy_stream_impl.h> #include <private/hwui/DrawGlInfo.h> #include <strings.h> @@ -50,8 +48,6 @@ #define TRIM_MEMORY_COMPLETE 80 #define TRIM_MEMORY_UI_HIDDEN 20 -#define ENABLE_RENDERNODE_SERIALIZATION false - #define LOG_FRAMETIME_MMA 0 #if LOG_FRAMETIME_MMA @@ -633,39 +629,6 @@ void CanvasContext::setName(const std::string&& name) { mJankTracker.setDescription(JankTrackerType::Window, std::move(name)); } -void CanvasContext::serializeDisplayListTree() { -#if ENABLE_RENDERNODE_SERIALIZATION - using namespace google::protobuf::io; - char package[128]; - // Check whether tracing is enabled for this process. - FILE* file = fopen("/proc/self/cmdline", "r"); - if (file) { - if (!fgets(package, 128, file)) { - ALOGE("Error reading cmdline: %s (%d)", strerror(errno), errno); - fclose(file); - return; - } - fclose(file); - } else { - ALOGE("Error opening /proc/self/cmdline: %s (%d)", strerror(errno), errno); - return; - } - char path[1024]; - snprintf(path, 1024, "/data/data/%s/cache/rendertree_dump", package); - int fd = open(path, O_CREAT | O_WRONLY, S_IRWXU | S_IRGRP | S_IROTH); - if (fd == -1) { - ALOGD("Failed to open '%s'", path); - return; - } - proto::RenderNode tree; - // TODO: Streaming writes? - mRootRenderNode->copyTo(&tree); - std::string data = tree.SerializeAsString(); - write(fd, data.c_str(), data.length()); - close(fd); -#endif -} - void CanvasContext::waitOnFences() { if (mFrameFences.size()) { ATRACE_CALL(); |