| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "WebCanvas.h" | 29 #include "WebCanvas.h" |
| 30 #include "WebCommon.h" | 30 #include "WebCommon.h" |
| 31 | 31 |
| 32 // FIXME: Remove this after references to this macro in Chromium are removed. | 32 // FIXME: Remove this after references to this macro in Chromium are removed. |
| 33 #define WEB_DISPLAY_ITEM_LIST_IS_DEFINED 1 | 33 #define WEB_DISPLAY_ITEM_LIST_IS_DEFINED 1 |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 class WebDisplayItemList; | 37 class WebDisplayItemList; |
| 38 struct WebRect; | 38 struct WebRect; |
| 39 struct WebFloatRect; | |
| 40 | 39 |
| 41 class BLINK_PLATFORM_EXPORT WebContentLayerClient { | 40 class BLINK_PLATFORM_EXPORT WebContentLayerClient { |
| 42 public: | 41 public: |
| 43 enum GraphicsContextStatus { GraphicsContextEnabled, GraphicsContextDisabled
}; | 42 enum GraphicsContextStatus { GraphicsContextEnabled, GraphicsContextDisabled
}; |
| 44 | 43 |
| 45 // Paints the content area for the layer, typically dirty rects submitted | 44 // Paints the content area for the layer, typically dirty rects submitted |
| 46 // through WebContentLayer::setNeedsDisplay, submitting drawing commands | 45 // through WebContentLayer::setNeedsDisplay, submitting drawing commands |
| 47 // through the WebCanvas. | 46 // through the WebCanvas. |
| 48 // The canvas is already clipped to the |clip| rect. | 47 // The canvas is already clipped to the |clip| rect. |
| 49 // Optionally, the implementation may set |opaque| to a rect covering pixels
that | 48 // Optionally, the implementation may set |opaque| to a rect covering pixels
that |
| 50 // the implementation knows are opaque. This information can be used for var
ious | 49 // the implementation knows are opaque. This information can be used for var
ious |
| 51 // optimizations. | 50 // optimizations. |
| 52 // The |disableContext| enum controls most processing in | 51 // The |disableContext| enum controls most processing in |
| 53 // GraphicsContext to isolate the painting code in performance tests. | 52 // GraphicsContext to isolate the painting code in performance tests. |
| 54 virtual void paintContents(WebCanvas*, const WebRect& clip, bool canPaintLCD
Text, GraphicsContextStatus = GraphicsContextEnabled) = 0; | 53 virtual void paintContents(WebCanvas*, const WebRect& clip, bool canPaintLCD
Text, GraphicsContextStatus = GraphicsContextEnabled) = 0; |
| 55 | 54 |
| 56 virtual void paintContents(WebDisplayItemList*, const WebRect& clip, bool ca
nPaintLCDText, GraphicsContextStatus = GraphicsContextEnabled) = 0; | 55 virtual void paintContents(WebDisplayItemList*, const WebRect& clip, bool ca
nPaintLCDText, GraphicsContextStatus = GraphicsContextEnabled) = 0; |
| 57 | 56 |
| 58 protected: | 57 protected: |
| 59 virtual ~WebContentLayerClient() { } | 58 virtual ~WebContentLayerClient() { } |
| 60 }; | 59 }; |
| 61 | 60 |
| 62 } // namespace blink | 61 } // namespace blink |
| 63 | 62 |
| 64 #endif // WebContentLayerClient_h | 63 #endif // WebContentLayerClient_h |
| OLD | NEW |