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

Unified Diff: Source/core/timing/PerformanceSmoothnessTiming.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: Git pull syncup Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/timing/PerformanceEntry.cpp ('k') | Source/core/timing/PerformanceSmoothnessTiming.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/timing/PerformanceSmoothnessTiming.h
diff --git a/Source/core/timing/PerformanceEntry.h b/Source/core/timing/PerformanceSmoothnessTiming.h
similarity index 61%
copy from Source/core/timing/PerformanceEntry.h
copy to Source/core/timing/PerformanceSmoothnessTiming.h
index 32dccaf628cf76c9188884726fa91d7c1b0dee6f..397d2c649bb86b104dc82bc1dc8c47400de0b385 100644
--- a/Source/core/timing/PerformanceEntry.h
+++ b/Source/core/timing/PerformanceSmoothnessTiming.h
@@ -29,48 +29,48 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef PerformanceEntry_h
-#define PerformanceEntry_h
+#ifndef PerformanceSmoothnessTiming_h
+#define PerformanceSmoothnessTiming_h
-#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/timing/PerformanceEntry.h"
#include "platform/heap/Handle.h"
#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
#include "wtf/text/WTFString.h"
namespace blink {
-class PerformanceEntry : public RefCountedWillBeGarbageCollectedFinalized<PerformanceEntry>, public ScriptWrappable {
- DEFINE_WRAPPERTYPEINFO();
+class Document;
+class KURL;
+class ResourceLoadTiming;
+class ResourceRequest;
+class ResourceResponse;
+class ResourceTimingInfo;
+
+class PerformanceSmoothnessTiming FINAL : public PerformanceEntry {
public:
- virtual ~PerformanceEntry();
+ static PassRefPtrWillBeRawPtr<PerformanceSmoothnessTiming> create(const String& name, Document* requestingDocument, unsigned sourceFrame, double startTime)
+ {
+ return adoptRefWillBeNoop(new PerformanceSmoothnessTiming(name, requestingDocument, sourceFrame, startTime));
+ }
- String name() const;
- String entryType() const;
- double startTime() const;
- double duration() const;
+ unsigned sourceFrame() const;
- virtual bool isResource() { return false; }
- virtual bool isMark() { return false; }
- virtual bool isMeasure() { return false; }
+ virtual bool isSmoothness() OVERRIDE { return true; }
- static bool startTimeCompareLessThan(PassRefPtrWillBeRawPtr<PerformanceEntry> a, PassRefPtrWillBeRawPtr<PerformanceEntry> b)
+ virtual void trace(Visitor* visitor)
{
- return a->startTime() < b->startTime();
+ PerformanceEntry::trace(visitor);
}
- virtual void trace(Visitor*) { }
-
-protected:
- PerformanceEntry(const String& name, const String& entryType, double startTime, double finishTime);
-
private:
- const String m_name;
- const String m_entryType;
- const double m_startTime;
- const double m_duration;
+ PerformanceSmoothnessTiming(const String& name, Document* requestingDocument, unsigned sourceFrame, double startTime);
+ virtual ~PerformanceSmoothnessTiming();
+
+ unsigned m_sourceFrame;
+ RefPtr<Document> m_requestingDocument;
};
-} // namespace blink
+}
-#endif // PerformanceEntry_h
+#endif // !defined(PerformanceSmoothnessTiming_h)
« no previous file with comments | « Source/core/timing/PerformanceEntry.cpp ('k') | Source/core/timing/PerformanceSmoothnessTiming.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698