| 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 27 matching lines...) Expand all Loading... |
| 38 class IntRect; | 38 class IntRect; |
| 39 | 39 |
| 40 class PLATFORM_EXPORT GraphicsContextPainter { | 40 class PLATFORM_EXPORT GraphicsContextPainter { |
| 41 public: | 41 public: |
| 42 virtual void paint(GraphicsContext&, const IntRect& clip) = 0; | 42 virtual void paint(GraphicsContext&, const IntRect& clip) = 0; |
| 43 | 43 |
| 44 protected: | 44 protected: |
| 45 virtual ~GraphicsContextPainter() { } | 45 virtual ~GraphicsContextPainter() { } |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 class PLATFORM_EXPORT OpaqueRectTrackingContentLayerDelegate : public blink::Web
ContentLayerClient { | 48 class PLATFORM_EXPORT OpaqueRectTrackingContentLayerDelegate : public WebContent
LayerClient { |
| 49 WTF_MAKE_NONCOPYABLE(OpaqueRectTrackingContentLayerDelegate); | 49 WTF_MAKE_NONCOPYABLE(OpaqueRectTrackingContentLayerDelegate); |
| 50 public: | 50 public: |
| 51 explicit OpaqueRectTrackingContentLayerDelegate(GraphicsContextPainter*); | 51 explicit OpaqueRectTrackingContentLayerDelegate(GraphicsContextPainter*); |
| 52 virtual ~OpaqueRectTrackingContentLayerDelegate(); | 52 virtual ~OpaqueRectTrackingContentLayerDelegate(); |
| 53 | 53 |
| 54 // If we know that everything that will be painted through this delegate, th
en we don't bother | 54 // If we know that everything that will be painted through this delegate, th
en we don't bother |
| 55 // tracking opaqueness. | 55 // tracking opaqueness. |
| 56 void setOpaque(bool opaque) { m_opaque = opaque; } | 56 void setOpaque(bool opaque) { m_opaque = opaque; } |
| 57 | 57 |
| 58 // blink::WebContentLayerClient implementation. | 58 // WebContentLayerClient implementation. |
| 59 virtual void paintContents(SkCanvas*, const blink::WebRect& clip, bool canPa
intLCDText, blink::WebFloatRect& opaque, | 59 virtual void paintContents(SkCanvas*, const WebRect& clip, bool canPaintLCDT
ext, WebFloatRect& opaque, |
| 60 blink::WebContentLayerClient::GraphicsContextStatus = GraphicsContextEna
bled) OVERRIDE; | 60 WebContentLayerClient::GraphicsContextStatus = GraphicsContextEnabled) O
VERRIDE; |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 GraphicsContextPainter* m_painter; | 63 GraphicsContextPainter* m_painter; |
| 64 bool m_opaque; | 64 bool m_opaque; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } | 67 } // namespace blink |
| 68 | 68 |
| 69 #endif // OpaqueRectTrackingContentLayerDelegate_h | 69 #endif // OpaqueRectTrackingContentLayerDelegate_h |
| OLD | NEW |