Loading cmds/dumpstate/dumpstate.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -2911,6 +2911,10 @@ Dumpstate::RunStatus Dumpstate::RunInternal(int32_t calling_uid, // own activity pushes out interesting data from the trace ring buffer. // The trace file is added to the zip by MaybeAddSystemTraceToZip(). MaybeSnapshotSystemTrace(); // If a winscope trace is running, snapshot it now. It will be pulled into bugreport later // from WMTRACE_DATA_DIR. MaybeSnapshotWinTrace(); } onUiIntensiveBugreportDumpsFinished(calling_uid); MaybeCheckUserConsent(calling_uid, calling_package); Loading Loading @@ -3022,6 +3026,14 @@ void Dumpstate::MaybeSnapshotSystemTrace() { // file in the later stages. } void Dumpstate::MaybeSnapshotWinTrace() { RunCommand( // Empty name because it's not intended to be classified as a bugreport section. // Actual tracing files can be found in "/data/misc/wmtrace/" in the bugreport. "", {"cmd", "window", "tracing", "save-for-bugreport"}, CommandOptions::WithTimeout(10).Always().DropRoot().RedirectStderr().Build()); } void Dumpstate::onUiIntensiveBugreportDumpsFinished(int32_t calling_uid) { if (calling_uid == AID_SHELL || !CalledByApi()) { return; Loading cmds/dumpstate/dumpstate.h +1 −0 Original line number Diff line number Diff line Loading @@ -549,6 +549,7 @@ class Dumpstate { void MaybeTakeEarlyScreenshot(); void MaybeSnapshotSystemTrace(); void MaybeSnapshotWinTrace(); void onUiIntensiveBugreportDumpsFinished(int32_t calling_uid); Loading cmds/installd/otapreopt.cpp +0 −34 Original line number Diff line number Diff line Loading @@ -349,9 +349,6 @@ private: } } // Clear cached artifacts. ClearDirectory(isa_path); // Check whether we have a boot image. // TODO: check that the files are correct wrt/ jars. std::string preopted_boot_art_path = Loading Loading @@ -395,37 +392,6 @@ private: return false; } static void ClearDirectory(const std::string& dir) { DIR* c_dir = opendir(dir.c_str()); if (c_dir == nullptr) { PLOG(WARNING) << "Unable to open " << dir << " to delete it's contents"; return; } for (struct dirent* de = readdir(c_dir); de != nullptr; de = readdir(c_dir)) { const char* name = de->d_name; if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0) { continue; } // We only want to delete regular files and symbolic links. std::string file = StringPrintf("%s/%s", dir.c_str(), name); if (de->d_type != DT_REG && de->d_type != DT_LNK) { LOG(WARNING) << "Unexpected file " << file << " of type " << std::hex << de->d_type << " encountered."; } else { // Try to unlink the file. if (unlink(file.c_str()) != 0) { PLOG(ERROR) << "Unable to unlink " << file; } } } CHECK_EQ(0, closedir(c_dir)) << "Unable to close directory."; } static const char* ParseNull(const char* arg) { return (strcmp(arg, "!") == 0) ? nullptr : arg; } Loading libs/renderengine/skia/filters/BlurFilter.cpp +13 −4 Original line number Diff line number Diff line Loading @@ -36,13 +36,18 @@ BlurFilter::BlurFilter() { SkString blurString(R"( in shader input; uniform float2 in_blurOffset; uniform float2 in_maxSizeXY; half4 main(float2 xy) { half4 c = sample(input, xy); c += sample(input, xy + float2( in_blurOffset.x, in_blurOffset.y)); c += sample(input, xy + float2( in_blurOffset.x, -in_blurOffset.y)); c += sample(input, xy + float2(-in_blurOffset.x, in_blurOffset.y)); c += sample(input, xy + float2(-in_blurOffset.x, -in_blurOffset.y)); c += sample(input, float2( clamp( in_blurOffset.x + xy.x, 0, in_maxSizeXY.x), clamp(in_blurOffset.y + xy.y, 0, in_maxSizeXY.y))); c += sample(input, float2( clamp( in_blurOffset.x + xy.x, 0, in_maxSizeXY.x), clamp(-in_blurOffset.y + xy.y, 0, in_maxSizeXY.y))); c += sample(input, float2( clamp( -in_blurOffset.x + xy.x, 0, in_maxSizeXY.x), clamp(in_blurOffset.y + xy.y, 0, in_maxSizeXY.y))); c += sample(input, float2( clamp( -in_blurOffset.x + xy.x, 0, in_maxSizeXY.x), clamp(-in_blurOffset.y + xy.y, 0, in_maxSizeXY.y))); return half4(c.rgb * 0.2, 1.0); } Loading Loading @@ -99,6 +104,8 @@ sk_sp<SkImage> BlurFilter::generate(GrRecordingContext* context, const uint32_t blurBuilder.child("input") = input->makeShader(SkTileMode::kClamp, SkTileMode::kClamp, linear, blurMatrix); blurBuilder.uniform("in_blurOffset") = SkV2{stepX * kInputScale, stepY * kInputScale}; blurBuilder.uniform("in_maxSizeXY") = SkV2{blurRect.width() * kInputScale - 1, blurRect.height() * kInputScale - 1}; sk_sp<SkImage> tmpBlur(blurBuilder.makeImage(context, nullptr, scaledInfo, false)); Loading @@ -108,6 +115,8 @@ sk_sp<SkImage> BlurFilter::generate(GrRecordingContext* context, const uint32_t blurBuilder.child("input") = tmpBlur->makeShader(SkTileMode::kClamp, SkTileMode::kClamp, linear); blurBuilder.uniform("in_blurOffset") = SkV2{stepX * stepScale, stepY * stepScale}; blurBuilder.uniform("in_maxSizeXY") = SkV2{blurRect.width() * kInputScale - 1, blurRect.height() * kInputScale - 1}; tmpBlur = blurBuilder.makeImage(context, nullptr, scaledInfo, false); } Loading opengl/OWNERS +1 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,4 @@ cnorthrop@google.com ianelliott@google.com jessehall@google.com lpy@google.com timvp@google.com Loading
cmds/dumpstate/dumpstate.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -2911,6 +2911,10 @@ Dumpstate::RunStatus Dumpstate::RunInternal(int32_t calling_uid, // own activity pushes out interesting data from the trace ring buffer. // The trace file is added to the zip by MaybeAddSystemTraceToZip(). MaybeSnapshotSystemTrace(); // If a winscope trace is running, snapshot it now. It will be pulled into bugreport later // from WMTRACE_DATA_DIR. MaybeSnapshotWinTrace(); } onUiIntensiveBugreportDumpsFinished(calling_uid); MaybeCheckUserConsent(calling_uid, calling_package); Loading Loading @@ -3022,6 +3026,14 @@ void Dumpstate::MaybeSnapshotSystemTrace() { // file in the later stages. } void Dumpstate::MaybeSnapshotWinTrace() { RunCommand( // Empty name because it's not intended to be classified as a bugreport section. // Actual tracing files can be found in "/data/misc/wmtrace/" in the bugreport. "", {"cmd", "window", "tracing", "save-for-bugreport"}, CommandOptions::WithTimeout(10).Always().DropRoot().RedirectStderr().Build()); } void Dumpstate::onUiIntensiveBugreportDumpsFinished(int32_t calling_uid) { if (calling_uid == AID_SHELL || !CalledByApi()) { return; Loading
cmds/dumpstate/dumpstate.h +1 −0 Original line number Diff line number Diff line Loading @@ -549,6 +549,7 @@ class Dumpstate { void MaybeTakeEarlyScreenshot(); void MaybeSnapshotSystemTrace(); void MaybeSnapshotWinTrace(); void onUiIntensiveBugreportDumpsFinished(int32_t calling_uid); Loading
cmds/installd/otapreopt.cpp +0 −34 Original line number Diff line number Diff line Loading @@ -349,9 +349,6 @@ private: } } // Clear cached artifacts. ClearDirectory(isa_path); // Check whether we have a boot image. // TODO: check that the files are correct wrt/ jars. std::string preopted_boot_art_path = Loading Loading @@ -395,37 +392,6 @@ private: return false; } static void ClearDirectory(const std::string& dir) { DIR* c_dir = opendir(dir.c_str()); if (c_dir == nullptr) { PLOG(WARNING) << "Unable to open " << dir << " to delete it's contents"; return; } for (struct dirent* de = readdir(c_dir); de != nullptr; de = readdir(c_dir)) { const char* name = de->d_name; if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0) { continue; } // We only want to delete regular files and symbolic links. std::string file = StringPrintf("%s/%s", dir.c_str(), name); if (de->d_type != DT_REG && de->d_type != DT_LNK) { LOG(WARNING) << "Unexpected file " << file << " of type " << std::hex << de->d_type << " encountered."; } else { // Try to unlink the file. if (unlink(file.c_str()) != 0) { PLOG(ERROR) << "Unable to unlink " << file; } } } CHECK_EQ(0, closedir(c_dir)) << "Unable to close directory."; } static const char* ParseNull(const char* arg) { return (strcmp(arg, "!") == 0) ? nullptr : arg; } Loading
libs/renderengine/skia/filters/BlurFilter.cpp +13 −4 Original line number Diff line number Diff line Loading @@ -36,13 +36,18 @@ BlurFilter::BlurFilter() { SkString blurString(R"( in shader input; uniform float2 in_blurOffset; uniform float2 in_maxSizeXY; half4 main(float2 xy) { half4 c = sample(input, xy); c += sample(input, xy + float2( in_blurOffset.x, in_blurOffset.y)); c += sample(input, xy + float2( in_blurOffset.x, -in_blurOffset.y)); c += sample(input, xy + float2(-in_blurOffset.x, in_blurOffset.y)); c += sample(input, xy + float2(-in_blurOffset.x, -in_blurOffset.y)); c += sample(input, float2( clamp( in_blurOffset.x + xy.x, 0, in_maxSizeXY.x), clamp(in_blurOffset.y + xy.y, 0, in_maxSizeXY.y))); c += sample(input, float2( clamp( in_blurOffset.x + xy.x, 0, in_maxSizeXY.x), clamp(-in_blurOffset.y + xy.y, 0, in_maxSizeXY.y))); c += sample(input, float2( clamp( -in_blurOffset.x + xy.x, 0, in_maxSizeXY.x), clamp(in_blurOffset.y + xy.y, 0, in_maxSizeXY.y))); c += sample(input, float2( clamp( -in_blurOffset.x + xy.x, 0, in_maxSizeXY.x), clamp(-in_blurOffset.y + xy.y, 0, in_maxSizeXY.y))); return half4(c.rgb * 0.2, 1.0); } Loading Loading @@ -99,6 +104,8 @@ sk_sp<SkImage> BlurFilter::generate(GrRecordingContext* context, const uint32_t blurBuilder.child("input") = input->makeShader(SkTileMode::kClamp, SkTileMode::kClamp, linear, blurMatrix); blurBuilder.uniform("in_blurOffset") = SkV2{stepX * kInputScale, stepY * kInputScale}; blurBuilder.uniform("in_maxSizeXY") = SkV2{blurRect.width() * kInputScale - 1, blurRect.height() * kInputScale - 1}; sk_sp<SkImage> tmpBlur(blurBuilder.makeImage(context, nullptr, scaledInfo, false)); Loading @@ -108,6 +115,8 @@ sk_sp<SkImage> BlurFilter::generate(GrRecordingContext* context, const uint32_t blurBuilder.child("input") = tmpBlur->makeShader(SkTileMode::kClamp, SkTileMode::kClamp, linear); blurBuilder.uniform("in_blurOffset") = SkV2{stepX * stepScale, stepY * stepScale}; blurBuilder.uniform("in_maxSizeXY") = SkV2{blurRect.width() * kInputScale - 1, blurRect.height() * kInputScale - 1}; tmpBlur = blurBuilder.makeImage(context, nullptr, scaledInfo, false); } Loading
opengl/OWNERS +1 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,4 @@ cnorthrop@google.com ianelliott@google.com jessehall@google.com lpy@google.com timvp@google.com