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

Side by Side Diff: sky/engine/public/platform/Platform.h

Issue 893503002: Remove unused trace sampling states (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « sky/engine/platform/testing/RunAllTests.cpp ('k') | sky/viewer/platform/platform_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 227
228 // Get a pointer to the enabled state of the given trace category. The 228 // Get a pointer to the enabled state of the given trace category. The
229 // embedder can dynamically change the enabled state as trace event 229 // embedder can dynamically change the enabled state as trace event
230 // recording is started and stopped by the application. Only long-lived 230 // recording is started and stopped by the application. Only long-lived
231 // literal strings should be given as the category name. The implementation 231 // literal strings should be given as the category name. The implementation
232 // expects the returned pointer to be held permanently in a local static. If 232 // expects the returned pointer to be held permanently in a local static. If
233 // the unsigned char is non-zero, tracing is enabled. If tracing is enabled, 233 // the unsigned char is non-zero, tracing is enabled. If tracing is enabled,
234 // addTraceEvent is expected to be called by the trace event macros. 234 // addTraceEvent is expected to be called by the trace event macros.
235 virtual const unsigned char* getTraceCategoryEnabledFlag(const char* categor yName) { return 0; } 235 virtual const unsigned char* getTraceCategoryEnabledFlag(const char* categor yName) { return 0; }
236 236
237 typedef long int TraceEventAPIAtomicWord;
238
239 // Get a pointer to a global state of the given thread. An embedder is
240 // expected to update the global state as the state of the embedder changes.
241 // A sampling thread in the Chromium side reads the global state periodicall y
242 // and reflects the sampling profiled results into about:tracing.
243 virtual TraceEventAPIAtomicWord* getTraceSamplingState(const unsigned bucket Name) { return 0; }
244
245 typedef uint64_t TraceEventHandle; 237 typedef uint64_t TraceEventHandle;
246 238
247 // Add a trace event to the platform tracing system. Depending on the actual 239 // Add a trace event to the platform tracing system. Depending on the actual
248 // enabled state, this event may be recorded or dropped. 240 // enabled state, this event may be recorded or dropped.
249 // - phase specifies the type of event: 241 // - phase specifies the type of event:
250 // - BEGIN ('B'): Marks the beginning of a scoped event. 242 // - BEGIN ('B'): Marks the beginning of a scoped event.
251 // - END ('E'): Marks the end of a scoped event. 243 // - END ('E'): Marks the end of a scoped event.
252 // - COMPLETE ('X'): Marks the beginning of a scoped event, but doesn't 244 // - COMPLETE ('X'): Marks the beginning of a scoped event, but doesn't
253 // need a matching END event. Instead, at the end of the scope, 245 // need a matching END event. Instead, at the end of the scope,
254 // updateTraceEventDuration() must be called with the TraceEventHandle 246 // updateTraceEventDuration() must be called with the TraceEventHandle
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // This value must be checked again after a context loss event as the platfo rm's capabilities may have changed. 337 // This value must be checked again after a context loss event as the platfo rm's capabilities may have changed.
346 virtual bool canAccelerate2dCanvas() { return false; } 338 virtual bool canAccelerate2dCanvas() { return false; }
347 339
348 protected: 340 protected:
349 virtual ~Platform() { } 341 virtual ~Platform() { }
350 }; 342 };
351 343
352 } // namespace blink 344 } // namespace blink
353 345
354 #endif // SKY_ENGINE_PUBLIC_PLATFORM_PLATFORM_H_ 346 #endif // SKY_ENGINE_PUBLIC_PLATFORM_PLATFORM_H_
OLDNEW
« no previous file with comments | « sky/engine/platform/testing/RunAllTests.cpp ('k') | sky/viewer/platform/platform_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698