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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintTiming.h

Issue 1456883002: Move paint-related timings out of DocumentTiming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PaintTiming_h
6 #define PaintTiming_h
7
8 #include "platform/Supplementable.h"
9 #include "platform/heap/Handle.h"
10
11 namespace blink {
12
13 class Document;
14 class LocalFrame;
15
16 class PaintTiming final : public NoBaseWillBeGarbageCollectedFinalized<PaintTimi ng>, public WillBeHeapSupplement<Document> {
17 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PaintTiming);
18 public:
19 virtual ~PaintTiming() { }
20
21 static PaintTiming& from(Document&);
22
23 void markFirstPaint();
24 void markFirstTextPaint();
25 void markFirstImagePaint();
26
27 // These return monotonically-increasing seconds.
28 double firstPaint() const { return m_firstPaint; }
29 double firstTextPaint() const { return m_firstTextPaint; }
30 double firstImagePaint() const { return m_firstImagePaint; }
31
32 DECLARE_VIRTUAL_TRACE();
33
34 private:
35 explicit PaintTiming(Document&);
36 LocalFrame* frame() const;
37 void notifyPaintTimingChanged();
38
39 double m_firstPaint = 0.0;
40 double m_firstTextPaint = 0.0;
41 double m_firstImagePaint = 0.0;
42
43 RawPtrWillBeMember<Document> m_document;
44 };
45
46 }
47
48 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | third_party/WebKit/Source/core/paint/PaintTiming.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698