| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 static const char DrawLazyPixelRefEvent[]; | 53 static const char DrawLazyPixelRefEvent[]; |
| 54 static const char DecodeLazyPixelRefEvent[]; | 54 static const char DecodeLazyPixelRefEvent[]; |
| 55 | 55 |
| 56 static const char ImageTypeArgument[]; | 56 static const char ImageTypeArgument[]; |
| 57 static const char CachedArgument[]; | 57 static const char CachedArgument[]; |
| 58 | 58 |
| 59 static const char LazyPixelRef[]; | 59 static const char LazyPixelRef[]; |
| 60 | 60 |
| 61 static void willDecodeImage(const String& imageType); | 61 static void willDecodeImage(const String& imageType); |
| 62 static void didDecodeImage(); | 62 static void didDecodeImage(); |
| 63 static void willResizeImage(bool shouldCache); | |
| 64 static void didResizeImage(); | |
| 65 static void didDrawLazyPixelRef(unsigned long long lazyPixelRefId); | 63 static void didDrawLazyPixelRef(unsigned long long lazyPixelRefId); |
| 66 static void willDecodeLazyPixelRef(unsigned long long lazyPixelRefId); | 64 static void willDecodeLazyPixelRef(unsigned long long lazyPixelRefId); |
| 67 static void didDecodeLazyPixelRef(); | 65 static void didDecodeLazyPixelRef(); |
| 68 | 66 |
| 69 private: | 67 private: |
| 70 static const char CategoryName[]; | 68 static const char CategoryName[]; |
| 71 }; | 69 }; |
| 72 | 70 |
| 73 inline void PlatformInstrumentation::willDecodeImage(const String& imageType) | 71 inline void PlatformInstrumentation::willDecodeImage(const String& imageType) |
| 74 { | 72 { |
| 75 TRACE_EVENT_BEGIN1(CategoryName, ImageDecodeEvent, ImageTypeArgument, imageT
ype.ascii()); | 73 TRACE_EVENT_BEGIN1(CategoryName, ImageDecodeEvent, ImageTypeArgument, imageT
ype.ascii()); |
| 76 } | 74 } |
| 77 | 75 |
| 78 inline void PlatformInstrumentation::didDecodeImage() | 76 inline void PlatformInstrumentation::didDecodeImage() |
| 79 { | 77 { |
| 80 TRACE_EVENT_END0(CategoryName, ImageDecodeEvent); | 78 TRACE_EVENT_END0(CategoryName, ImageDecodeEvent); |
| 81 } | 79 } |
| 82 | 80 |
| 83 inline void PlatformInstrumentation::willResizeImage(bool shouldCache) | |
| 84 { | |
| 85 TRACE_EVENT_BEGIN1(CategoryName, ImageResizeEvent, CachedArgument, shouldCac
he); | |
| 86 } | |
| 87 | |
| 88 inline void PlatformInstrumentation::didResizeImage() | |
| 89 { | |
| 90 TRACE_EVENT_END0(CategoryName, ImageResizeEvent); | |
| 91 } | |
| 92 | |
| 93 inline void PlatformInstrumentation::didDrawLazyPixelRef(unsigned long long lazy
PixelRefId) | 81 inline void PlatformInstrumentation::didDrawLazyPixelRef(unsigned long long lazy
PixelRefId) |
| 94 { | 82 { |
| 95 TRACE_EVENT_INSTANT1(CategoryName, DrawLazyPixelRefEvent, TRACE_EVENT_SCOPE_
THREAD, LazyPixelRef, lazyPixelRefId); | 83 TRACE_EVENT_INSTANT1(CategoryName, DrawLazyPixelRefEvent, TRACE_EVENT_SCOPE_
THREAD, LazyPixelRef, lazyPixelRefId); |
| 96 } | 84 } |
| 97 | 85 |
| 98 inline void PlatformInstrumentation::willDecodeLazyPixelRef(unsigned long long l
azyPixelRefId) | 86 inline void PlatformInstrumentation::willDecodeLazyPixelRef(unsigned long long l
azyPixelRefId) |
| 99 { | 87 { |
| 100 TRACE_EVENT_BEGIN1(CategoryName, DecodeLazyPixelRefEvent, LazyPixelRef, lazy
PixelRefId); | 88 TRACE_EVENT_BEGIN1(CategoryName, DecodeLazyPixelRefEvent, LazyPixelRef, lazy
PixelRefId); |
| 101 } | 89 } |
| 102 | 90 |
| 103 inline void PlatformInstrumentation::didDecodeLazyPixelRef() | 91 inline void PlatformInstrumentation::didDecodeLazyPixelRef() |
| 104 { | 92 { |
| 105 TRACE_EVENT_END0(CategoryName, DecodeLazyPixelRefEvent); | 93 TRACE_EVENT_END0(CategoryName, DecodeLazyPixelRefEvent); |
| 106 } | 94 } |
| 107 | 95 |
| 108 } // namespace blink | 96 } // namespace blink |
| 109 | 97 |
| 110 #endif // PlatformInstrumentation_h | 98 #endif // PlatformInstrumentation_h |
| OLD | NEW |