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

Side by Side Diff: Source/core/timing/Performance.h

Issue 390193003: [not for review] Add Draw entries to window Performance Timeline (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code refactoring in RenderView 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 PerformanceTiming* timing() const; 73 PerformanceTiming* timing() const;
74 double now() const; 74 double now() const;
75 75
76 PerformanceEntryVector getEntries() const; 76 PerformanceEntryVector getEntries() const;
77 PerformanceEntryVector getEntriesByType(const String& entryType); 77 PerformanceEntryVector getEntriesByType(const String& entryType);
78 PerformanceEntryVector getEntriesByName(const String& name, const String& en tryType); 78 PerformanceEntryVector getEntriesByName(const String& name, const String& en tryType);
79 79
80 void webkitClearResourceTimings(); 80 void webkitClearResourceTimings();
81 void webkitSetResourceTimingBufferSize(unsigned); 81 void webkitSetResourceTimingBufferSize(unsigned);
82 82
83 void webkitClearDrawTimings();
84 void webkitSetDrawTimingBufferSize(unsigned);
85
83 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitresourcetimingbufferfull); 86 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitresourcetimingbufferfull);
84 87
88 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitdrawtimingbufferfull);
89
85 void addResourceTiming(const ResourceTimingInfo&, Document*); 90 void addResourceTiming(const ResourceTimingInfo&, Document*);
86 91
92 void addDrawTiming(Document*, unsigned, double);
93
87 void mark(const String& markName, ExceptionState&); 94 void mark(const String& markName, ExceptionState&);
88 void clearMarks(const String& markName); 95 void clearMarks(const String& markName);
89 96
90 void measure(const String& measureName, const String& startMark, const Strin g& endMark, ExceptionState&); 97 void measure(const String& measureName, const String& startMark, const Strin g& endMark, ExceptionState&);
91 void clearMeasures(const String& measureName); 98 void clearMeasures(const String& measureName);
92 99
93 virtual void trace(Visitor*) OVERRIDE; 100 virtual void trace(Visitor*) OVERRIDE;
94 101
95 private: 102 private:
96 explicit Performance(LocalFrame*); 103 explicit Performance(LocalFrame*);
97 104
98 bool isResourceTimingBufferFull(); 105 bool isResourceTimingBufferFull();
99 void addResourceTimingBuffer(PassRefPtrWillBeRawPtr<PerformanceEntry>); 106 void addResourceTimingBuffer(PassRefPtrWillBeRawPtr<PerformanceEntry>);
100 107
108 bool isDrawTimingBufferFull();
109 void addDrawTimingBuffer(PassRefPtrWillBeRawPtr<PerformanceEntry>);
110
101 mutable RefPtrWillBeMember<PerformanceNavigation> m_navigation; 111 mutable RefPtrWillBeMember<PerformanceNavigation> m_navigation;
102 mutable RefPtrWillBeMember<PerformanceTiming> m_timing; 112 mutable RefPtrWillBeMember<PerformanceTiming> m_timing;
103 113
104 PerformanceEntryVector m_resourceTimingBuffer; 114 PerformanceEntryVector m_resourceTimingBuffer;
105 unsigned m_resourceTimingBufferSize; 115 unsigned m_resourceTimingBufferSize;
116 PerformanceEntryVector m_drawTimingBuffer;
117 unsigned m_drawTimingBufferSize;
106 double m_referenceTime; 118 double m_referenceTime;
107 119
108 RefPtrWillBeMember<UserTiming> m_userTiming; 120 RefPtrWillBeMember<UserTiming> m_userTiming;
109 }; 121 };
110 122
111 } 123 }
112 124
113 #endif // Performance_h 125 #endif // Performance_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698