OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef FramePainter_h | 5 #ifndef FramePainter_h |
6 #define FramePainter_h | 6 #define FramePainter_h |
7 | 7 |
| 8 #include "core/paint/FramePaintTiming.h" |
8 #include "core/paint/PaintPhase.h" | 9 #include "core/paint/PaintPhase.h" |
9 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
10 | 11 |
11 namespace blink { | 12 namespace blink { |
12 | 13 |
13 class CullRect; | 14 class CullRect; |
14 class FrameView; | 15 class FrameView; |
15 class GraphicsContext; | 16 class GraphicsContext; |
16 class IntRect; | 17 class IntRect; |
17 class Scrollbar; | 18 class Scrollbar; |
18 | 19 |
19 class FramePainter { | 20 class FramePainter { |
20 STACK_ALLOCATED(); | 21 STACK_ALLOCATED(); |
21 WTF_MAKE_NONCOPYABLE(FramePainter); | 22 WTF_MAKE_NONCOPYABLE(FramePainter); |
22 | 23 |
23 public: | 24 public: |
24 explicit FramePainter(const FrameView& frame_view) | 25 FramePainter(GraphicsContext&, const FrameView&); |
25 : frame_view_(&frame_view) {} | |
26 | 26 |
27 void Paint(GraphicsContext&, const GlobalPaintFlags, const CullRect&); | 27 void Paint(const GlobalPaintFlags, const CullRect&); |
28 void PaintScrollbars(GraphicsContext&, const IntRect&); | 28 void PaintScrollbars(const IntRect&); |
29 void PaintContents(GraphicsContext&, const GlobalPaintFlags, const IntRect&); | 29 void PaintContents(const GlobalPaintFlags, const IntRect&); |
30 void PaintScrollCorner(GraphicsContext&, const IntRect& corner_rect); | 30 void PaintScrollCorner(const IntRect& corner_rect); |
31 | 31 |
32 private: | 32 private: |
33 void PaintScrollbar(GraphicsContext&, Scrollbar&, const IntRect&); | 33 void PaintScrollbar(Scrollbar&, const IntRect&); |
34 | 34 |
35 const FrameView& GetFrameView(); | 35 const FrameView& GetFrameView() const; |
36 | 36 |
| 37 GraphicsContext& context_; |
37 Member<const FrameView> frame_view_; | 38 Member<const FrameView> frame_view_; |
38 static bool in_paint_contents_; | 39 static bool in_paint_contents_; |
| 40 FramePaintTiming frame_paint_timing_; |
39 }; | 41 }; |
40 | 42 |
41 } // namespace blink | 43 } // namespace blink |
42 | 44 |
43 #endif // FramePainter_h | 45 #endif // FramePainter_h |
OLD | NEW |