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/PaintPhase.h" | 8 #include "core/paint/PaintPhase.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class CullRect; | 13 class CullRect; |
| 14 struct FrameFirstPaint; |
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 ~FramePainter(); |
26 | 27 |
27 void Paint(GraphicsContext&, const GlobalPaintFlags, const CullRect&); | 28 void Paint(const GlobalPaintFlags, const CullRect&); |
28 void PaintScrollbars(GraphicsContext&, const IntRect&); | 29 void PaintScrollbars(const IntRect&); |
29 void PaintContents(GraphicsContext&, const GlobalPaintFlags, const IntRect&); | 30 void PaintContents(const GlobalPaintFlags, const IntRect&); |
30 void PaintScrollCorner(GraphicsContext&, const IntRect& corner_rect); | 31 void PaintScrollCorner(const IntRect& corner_rect); |
31 | 32 |
32 private: | 33 private: |
33 void PaintScrollbar(GraphicsContext&, Scrollbar&, const IntRect&); | 34 void PaintScrollbar(Scrollbar&, const IntRect&); |
34 | 35 |
35 const FrameView& GetFrameView(); | 36 const FrameView& GetFrameView() const; |
| 37 void NotifyPaint(const FrameFirstPaint&) const; |
36 | 38 |
| 39 GraphicsContext& context_; |
37 Member<const FrameView> frame_view_; | 40 Member<const FrameView> frame_view_; |
38 static bool in_paint_contents_; | 41 static bool in_paint_contents_; |
39 }; | 42 }; |
40 | 43 |
41 } // namespace blink | 44 } // namespace blink |
42 | 45 |
43 #endif // FramePainter_h | 46 #endif // FramePainter_h |
OLD | NEW |