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 23 matching lines...) Expand all Loading... |
34 class SkCanvas; | 34 class SkCanvas; |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 class GraphicsContext; | 38 class GraphicsContext; |
39 class IntRect; | 39 class IntRect; |
40 class PaintController; | 40 class PaintController; |
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* interestRect) = 0; |
45 virtual PaintController* paintController() = 0; | 45 virtual PaintController* paintController() = 0; |
46 | 46 |
47 protected: | 47 protected: |
48 virtual ~GraphicsContextPainter() { } | 48 virtual ~GraphicsContextPainter() { } |
49 }; | 49 }; |
50 | 50 |
51 class PLATFORM_EXPORT ContentLayerDelegate : public WebContentLayerClient { | 51 class PLATFORM_EXPORT ContentLayerDelegate : public WebContentLayerClient { |
52 WTF_MAKE_NONCOPYABLE(ContentLayerDelegate); | 52 WTF_MAKE_NONCOPYABLE(ContentLayerDelegate); |
53 | 53 |
54 public: | 54 public: |
55 explicit ContentLayerDelegate(GraphicsContextPainter*); | 55 explicit ContentLayerDelegate(GraphicsContextPainter*); |
56 ~ContentLayerDelegate() override; | 56 ~ContentLayerDelegate() override; |
57 | 57 |
58 // WebContentLayerClient implementation. | 58 // WebContentLayerClient implementation. |
59 void paintContents(WebDisplayItemList*, const WebRect& clip, WebContentLayer
Client::PaintingControlSetting = PaintDefaultBehavior) override; | 59 void paintContents(WebDisplayItemList*, const WebRect& clip, WebContentLayer
Client::PaintingControlSetting = PaintDefaultBehavior) override; |
60 size_t approximateUnsharedMemoryUsage() const override; | 60 size_t approximateUnsharedMemoryUsage() const override; |
61 | 61 |
62 private: | 62 private: |
63 GraphicsContextPainter* m_painter; | 63 GraphicsContextPainter* m_painter; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace blink | 66 } // namespace blink |
67 | 67 |
68 #endif // ContentLayerDelegate_h | 68 #endif // ContentLayerDelegate_h |
OLD | NEW |