Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3106)

Unified Diff: cc/resources/tile_priority.h

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/resources/tile_priority.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_priority.h
diff --git a/cc/resources/tile_priority.h b/cc/resources/tile_priority.h
index a0903f12a15e15cd0c49304c1d88b9ee3a6d96c9..02aadae9e0a24a1386b74bd1b9145caf1175a211 100644
--- a/cc/resources/tile_priority.h
+++ b/cc/resources/tile_priority.h
@@ -7,6 +7,7 @@
#include <algorithm>
#include <limits>
+#include <string>
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -29,16 +30,14 @@ enum WhichTree {
NUM_TREES = 2
// Be sure to update WhichTreeAsValue when adding new fields.
};
-scoped_ptr<base::Value> WhichTreeAsValue(
- WhichTree tree);
+scoped_ptr<base::Value> WhichTreeAsValue(WhichTree tree);
enum TileResolution {
LOW_RESOLUTION = 0 ,
HIGH_RESOLUTION = 1,
NON_IDEAL_RESOLUTION = 2,
};
-scoped_ptr<base::Value> TileResolutionAsValue(
- TileResolution resolution);
+std::string TileResolutionToString(TileResolution resolution);
struct CC_EXPORT TilePriority {
enum PriorityBin { NOW, SOON, EVENTUALLY };
@@ -83,7 +82,7 @@ struct CC_EXPORT TilePriority {
}
}
- scoped_ptr<base::Value> AsValue() const;
+ void AsValueInto(base::debug::TracedValue* dict) const;
bool operator ==(const TilePriority& other) const {
return resolution == other.resolution &&
@@ -108,7 +107,7 @@ struct CC_EXPORT TilePriority {
float distance_to_visible;
};
-scoped_ptr<base::Value> TilePriorityBinAsValue(TilePriority::PriorityBin bin);
+std::string TilePriorityBinToString(TilePriority::PriorityBin bin);
enum TileMemoryLimitPolicy {
// Nothing.
@@ -128,8 +127,7 @@ enum TileMemoryLimitPolicy {
// NOTE: Be sure to update TreePriorityAsValue and kBinPolicyMap when adding
// or reordering fields.
};
-scoped_ptr<base::Value> TileMemoryLimitPolicyAsValue(
- TileMemoryLimitPolicy policy);
+std::string TileMemoryLimitPolicyToString(TileMemoryLimitPolicy policy);
enum TreePriority {
SAME_PRIORITY_FOR_BOTH_TREES,
@@ -138,7 +136,7 @@ enum TreePriority {
NUM_TREE_PRIORITIES
// Be sure to update TreePriorityAsValue when adding new fields.
};
-scoped_ptr<base::Value> TreePriorityAsValue(TreePriority prio);
+std::string TreePriorityToString(TreePriority prio);
class GlobalStateThatImpactsTilePriority {
public:
@@ -168,7 +166,7 @@ class GlobalStateThatImpactsTilePriority {
return !(*this == other);
}
- scoped_ptr<base::Value> AsValue() const;
+ void AsValueInto(base::debug::TracedValue* dict) const;
};
} // namespace cc
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/resources/tile_priority.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698