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 15 matching lines...) Expand all Loading... |
26 #define ContentLayerDelegate_h | 26 #define ContentLayerDelegate_h |
27 | 27 |
28 #include "platform/PlatformExport.h" | 28 #include "platform/PlatformExport.h" |
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 gfx { |
| 37 class Rect; |
| 38 } |
| 39 |
36 namespace blink { | 40 namespace blink { |
37 | 41 |
38 class GraphicsContext; | 42 class GraphicsContext; |
39 class IntRect; | 43 class IntRect; |
40 class PaintController; | 44 class PaintController; |
41 | 45 |
42 class PLATFORM_EXPORT GraphicsContextPainter { | 46 class PLATFORM_EXPORT GraphicsContextPainter { |
43 public: | 47 public: |
| 48 virtual IntRect interestRect() = 0; |
44 virtual void paint(GraphicsContext&, const IntRect* interestRect) = 0; | 49 virtual void paint(GraphicsContext&, const IntRect* interestRect) = 0; |
45 virtual PaintController* paintController() = 0; | 50 virtual PaintController* paintController() = 0; |
46 | 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 |
| 63 gfx::Rect paintableRegion() override; |
| 64 |
58 // WebContentLayerClient implementation. | 65 // WebContentLayerClient implementation. |
59 void paintContents(WebDisplayItemList*, const WebRect& clip, WebContentLayer
Client::PaintingControlSetting = PaintDefaultBehavior) override; | 66 void paintContents(WebDisplayItemList*, const WebRect& clip, WebContentLayer
Client::PaintingControlSetting = PaintDefaultBehavior) override; |
60 size_t approximateUnsharedMemoryUsage() const override; | 67 size_t approximateUnsharedMemoryUsage() const override; |
61 | 68 |
62 private: | 69 private: |
63 GraphicsContextPainter* m_painter; | 70 GraphicsContextPainter* m_painter; |
64 }; | 71 }; |
65 | 72 |
66 } // namespace blink | 73 } // namespace blink |
67 | 74 |
68 #endif // ContentLayerDelegate_h | 75 #endif // ContentLayerDelegate_h |
OLD | NEW |