OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 24 matching lines...) Expand all Loading... | |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 class DisplayItemList; | 38 class DisplayItemList; |
39 class GraphicsContext; | 39 class GraphicsContext; |
40 class IntRect; | 40 class IntRect; |
41 | 41 |
42 class PLATFORM_EXPORT GraphicsContextPainter { | 42 class PLATFORM_EXPORT GraphicsContextPainter { |
43 public: | 43 public: |
44 virtual void paint(GraphicsContext&, const IntRect& clip) = 0; | 44 virtual void paint(GraphicsContext&, const IntRect& clip) = 0; |
45 virtual void paintIfNeeded(GraphicsContext&) = 0; | |
wkorman
2015/10/09 19:46:32
Comment w/ some brief docs? Esp. re: this vs the o
chrishtr
2015/10/09 20:54:52
Done.
| |
45 virtual DisplayItemList* displayItemList() = 0; | 46 virtual DisplayItemList* displayItemList() = 0; |
46 | 47 |
47 protected: | 48 protected: |
48 virtual ~GraphicsContextPainter() { } | 49 virtual ~GraphicsContextPainter() { } |
49 }; | 50 }; |
50 | 51 |
51 class PLATFORM_EXPORT ContentLayerDelegate : public WebContentLayerClient { | 52 class PLATFORM_EXPORT ContentLayerDelegate : public WebContentLayerClient { |
52 WTF_MAKE_NONCOPYABLE(ContentLayerDelegate); | 53 WTF_MAKE_NONCOPYABLE(ContentLayerDelegate); |
53 | 54 |
54 public: | 55 public: |
55 explicit ContentLayerDelegate(GraphicsContextPainter*); | 56 explicit ContentLayerDelegate(GraphicsContextPainter*); |
56 ~ContentLayerDelegate() override; | 57 ~ContentLayerDelegate() override; |
57 | 58 |
58 // WebContentLayerClient implementation. | 59 // WebContentLayerClient implementation. |
59 void paintContents(SkCanvas*, const WebRect& clip, WebContentLayerClient::Pa intingControlSetting = PaintDefaultBehavior) override; | 60 void paintContents(SkCanvas*, const WebRect& clip, WebContentLayerClient::Pa intingControlSetting = PaintDefaultBehavior) override; |
60 void paintContents(WebDisplayItemList*, const WebRect& clip, WebContentLayer Client::PaintingControlSetting = PaintDefaultBehavior) override; | 61 void paintContents(WebDisplayItemList*, const WebRect& clip, WebContentLayer Client::PaintingControlSetting = PaintDefaultBehavior) override; |
61 size_t approximateUnsharedMemoryUsage() const override; | 62 size_t approximateUnsharedMemoryUsage() const override; |
62 | 63 |
63 private: | 64 private: |
64 GraphicsContextPainter* m_painter; | 65 GraphicsContextPainter* m_painter; |
65 }; | 66 }; |
66 | 67 |
67 } // namespace blink | 68 } // namespace blink |
68 | 69 |
69 #endif // ContentLayerDelegate_h | 70 #endif // ContentLayerDelegate_h |
OLD | NEW |