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 18 matching lines...) Expand all Loading... | |
29 #include "platform/geometry/IntSize.h" | 29 #include "platform/geometry/IntSize.h" |
30 #include "public/platform/WebContentLayerClient.h" | 30 #include "public/platform/WebContentLayerClient.h" |
31 #include "wtf/Noncopyable.h" | 31 #include "wtf/Noncopyable.h" |
32 #include "wtf/PassOwnPtr.h" | 32 #include "wtf/PassOwnPtr.h" |
33 | 33 |
34 class SkCanvas; | 34 class SkCanvas; |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 class DisplayItemList; | 38 class DisplayItemList; |
39 class DisplayItemTransformTree; | |
40 class DisplayList; | |
39 class GraphicsContext; | 41 class GraphicsContext; |
40 class IntRect; | 42 class IntRect; |
41 | 43 |
42 class PLATFORM_EXPORT GraphicsContextPainter { | 44 class PLATFORM_EXPORT GraphicsContextPainter { |
43 public: | 45 public: |
44 virtual void paint(GraphicsContext&, const IntRect& clip) = 0; | 46 virtual void paint(GraphicsContext&, const IntRect& clip) = 0; |
45 virtual DisplayItemList* displayItemList() = 0; | 47 virtual DisplayItemList* displayItemList() = 0; |
46 | 48 |
49 virtual const DisplayList* displayList() const { return 0; } | |
50 virtual const DisplayItemTransformTree* transformTree() const { return 0; } | |
51 | |
47 protected: | 52 protected: |
48 virtual ~GraphicsContextPainter() { } | 53 virtual ~GraphicsContextPainter() { } |
49 }; | 54 }; |
50 | 55 |
51 class PLATFORM_EXPORT ContentLayerDelegate : public WebContentLayerClient { | 56 class PLATFORM_EXPORT ContentLayerDelegate : public WebContentLayerClient { |
52 WTF_MAKE_NONCOPYABLE(ContentLayerDelegate); | 57 WTF_MAKE_NONCOPYABLE(ContentLayerDelegate); |
53 | 58 |
54 public: | 59 public: |
55 explicit ContentLayerDelegate(GraphicsContextPainter*); | 60 explicit ContentLayerDelegate(GraphicsContextPainter*); |
56 ~ContentLayerDelegate() override; | 61 ~ContentLayerDelegate() override; |
57 | 62 |
58 // WebContentLayerClient implementation. | 63 // WebContentLayerClient implementation. |
59 void paintContents(SkCanvas*, const WebRect& clip, WebContentLayerClient::Pa intingControlSetting = PaintDefaultBehavior) override; | 64 void paintContents(SkCanvas*, const WebRect& clip, WebContentLayerClient::Pa intingControlSetting = PaintDefaultBehavior) override; |
60 void paintContents(WebDisplayItemList*, const WebRect& clip, WebContentLayer Client::PaintingControlSetting = PaintDefaultBehavior) override; | 65 void paintContents(WebDisplayItemList*, const WebRect& clip, WebContentLayer Client::PaintingControlSetting = PaintDefaultBehavior) override; |
61 size_t approximateUnsharedMemoryUsage() const override; | 66 size_t approximateUnsharedMemoryUsage() const override; |
62 | 67 |
68 const WebDisplayList* displayList() const override; | |
69 | |
70 // This is only set on a root graphics layer. Alternatively, this could be s et on the layer tree host. | |
enne (OOO)
2015/07/24 18:19:24
On the LTH, yes please.
weiliangc
2015/07/24 19:17:15
It'd make sense for the global DisplayItemList to
| |
71 const WebDisplayItemTransformTree* transformTree() const override; | |
72 | |
63 private: | 73 private: |
64 GraphicsContextPainter* m_painter; | 74 GraphicsContextPainter* m_painter; |
65 }; | 75 }; |
66 | 76 |
67 } // namespace blink | 77 } // namespace blink |
68 | 78 |
69 #endif // ContentLayerDelegate_h | 79 #endif // ContentLayerDelegate_h |
OLD | NEW |