summaryrefslogtreecommitdiffstats
path: root/cc/scheduler/scheduler_settings.h
diff options
context:
space:
mode:
authorprimiano <primiano@chromium.org>2016-02-29 12:46:05 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-29 20:47:30 +0000
commitcb1afb351f2232e22b4be9bbbe7c0449decee471 (patch)
tree0a6e1671a22625cb1de12949ff3776e055ee3cb5 /cc/scheduler/scheduler_settings.h
parent11ea3850f60af63a8c917d9798bef890f5daa9f2 (diff)
downloadchromium_src-cb1afb351f2232e22b4be9bbbe7c0449decee471.zip
chromium_src-cb1afb351f2232e22b4be9bbbe7c0449decee471.tar.gz
chromium_src-cb1afb351f2232e22b4be9bbbe7c0449decee471.tar.bz2
tracing: Make ConvertableToTraceFormat move-only
Summary. This CL: - Makes TraceEvent ownership a move-only scoped_ptr. - Makes ConvertableToTraceFormat (CTTF) itself move-only scoped_ptr. - Updates all the codebase that uses CTTF in TRACE_EVENT macros to use move-only semantics. Background: Historically ConvertableToTraceFormat (CTTF) was RefCounted. The main reason seems to be supporting monitoring mode (now deprecated) where tracing needed to copy TraceEvents without flushing the TraceLog. Not what monitoring mode is gone, there is no reason why TraceEvent(s) should not be move-only. Unfortunately CTTF being RefCounted exposed that implementation detail to its public interface. Fortunately, most of the codebase doesn't care about the fact that CTTF is RefCounted. The only exceptions are: 1. Memory-infra heap profiler {StackFrame,TypeInfo}Deduplicator 2. cc::Layer DebugInfo 1) Is addressed creating a proxy class which delegates the CTTF methods to the duplicators inside MDSessionState. Essentially it makes the CTTF metadata events shared co-owners of the MDSessionState. 2) After an offline chat with danakj@, it seems OK to make DebugInfo(s) moved scoped_ptr (as opposite as copied), moving the ownership to the active layer and keeping a raw ptr into the pending layer. BUG=559117 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel TBR=thakis,jochen,tbarzic,mnaganov,skyostil Review URL: https://codereview.chromium.org/1717283003 Cr-Commit-Position: refs/heads/master@{#378263}
Diffstat (limited to 'cc/scheduler/scheduler_settings.h')
-rw-r--r--cc/scheduler/scheduler_settings.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cc/scheduler/scheduler_settings.h b/cc/scheduler/scheduler_settings.h
index e624cf8..7fd4447 100644
--- a/cc/scheduler/scheduler_settings.h
+++ b/cc/scheduler/scheduler_settings.h
@@ -34,7 +34,7 @@ class CC_EXPORT SchedulerSettings {
int maximum_number_of_failed_draws_before_draw_is_forced;
base::TimeDelta background_frame_interval;
- scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
+ scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
};
} // namespace cc