| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |