summaryrefslogtreecommitdiff
path: root/jni/node-inl.h
diff options
context:
space:
mode:
author Cody Schuffelen <schuffelen@google.com> 2021-01-28 17:43:28 +0000
committer Cody Schuffelen <schuffelen@google.com> 2021-01-28 17:46:41 +0000
commit9679bbaa78c842341b3c13c4aa2579d5fd00d4f8 (patch)
tree36a6643610b6d41a51ed9f80215c715383636b96 /jni/node-inl.h
parent3efc96064003eb5c5e8e717391192c04ea3b4d11 (diff)
Revert "Improve transcoding metrics logging"
This reverts commit 3efc96064003eb5c5e8e717391192c04ea3b4d11. Reason for revert: Breakage in com.android.devicehealthchecks.SystemAppCheck#system_app_crash Change-Id: I2685f2207009fd776497da0f564a1138df5ae9f8 Bug: 178711878
Diffstat (limited to 'jni/node-inl.h')
-rw-r--r--jni/node-inl.h24
1 files changed, 7 insertions, 17 deletions
diff --git a/jni/node-inl.h b/jni/node-inl.h
index 99960ed30..2b577bf4a 100644
--- a/jni/node-inl.h
+++ b/jni/node-inl.h
@@ -120,14 +120,13 @@ class node {
// Creates a new node with the specified parent, name and lock.
static node* Create(node* parent, const std::string& name, const std::string& io_path,
bool should_invalidate, bool transforms_complete, const int transforms,
- const int transforms_reason, std::recursive_mutex* lock,
- NodeTracker* tracker) {
+ std::recursive_mutex* lock, NodeTracker* tracker) {
// Place the entire constructor under a critical section to make sure
// node creation, tracking (if enabled) and the addition to a parent are
// atomic.
std::lock_guard<std::recursive_mutex> guard(*lock);
return new node(parent, name, io_path, should_invalidate, transforms_complete, transforms,
- transforms_reason, lock, tracker);
+ lock, tracker);
}
// Creates a new root node. Root nodes have no parents by definition
@@ -136,8 +135,7 @@ class node {
NodeTracker* tracker) {
std::lock_guard<std::recursive_mutex> guard(*lock);
node* root = new node(nullptr, path, path, false /* should_invalidate */,
- true /* transforms_complete */, 0 /* transforms */,
- 0 /* transforms_reason */, lock, tracker);
+ true /* transforms_complete */, 0, lock, tracker);
// The root always has one extra reference to avoid it being
// accidentally collected.
@@ -271,8 +269,6 @@ class node {
int GetTransforms() const { return transforms_; }
- int GetTransformsReason() const { return transforms_reason_; }
-
bool IsTransformsComplete() const {
return transforms_complete_.load(std::memory_order_acquire);
}
@@ -354,12 +350,11 @@ class node {
private:
node(node* parent, const std::string& name, const std::string& io_path,
const bool should_invalidate, const bool transforms_complete, const int transforms,
- const int transforms_reason, std::recursive_mutex* lock, NodeTracker* tracker)
+ std::recursive_mutex* lock, NodeTracker* tracker)
: name_(name),
io_path_(io_path),
transforms_complete_(transforms_complete),
transforms_(transforms),
- transforms_reason_(transforms_reason),
refcount_(0),
parent_(nullptr),
has_redacted_cache_(false),
@@ -495,15 +490,10 @@ class node {
// Whether any transforms required on |io_path_| are complete.
// If false, might need to call a node transform function with |transforms| below
std::atomic_bool transforms_complete_;
- // Opaque flags that determines the 'required' transforms to perform on node
- // before IO. These flags should not be interpreted in native but should be passed to the
- // MediaProvider as part of a transform function and if successful, |transforms_complete_|
- // should be set to true
+ // Opaque flags that determine the 'supported' and 'required' transforms to perform on node
+ // before IO. These flags should not be interpreted in native but should be passed as part
+ // of a transform function and if successful, |transforms_complete_| should be set to true
const int transforms_;
- // Opaque value indicating the reason why transforms are required.
- // This value should not be interpreted in native but should be passed to the MediaProvider
- // as part of a transform function
- const int transforms_reason_;
// The reference count for this node. Guarded by |lock_|.
uint32_t refcount_;
// Set of children of this node. All of them contain a back reference