Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 struct WebRect; | 35 struct WebRect; |
| 36 | 36 |
| 37 class BLINK_PLATFORM_EXPORT WebContentLayerClient { | 37 class BLINK_PLATFORM_EXPORT WebContentLayerClient { |
| 38 public: | 38 public: |
| 39 enum GraphicsContextStatus { GraphicsContextEnabled, GraphicsContextDisabled }; | 39 enum GraphicsContextStatus { GraphicsContextEnabled, GraphicsContextDisabled }; |
| 40 | 40 |
| 41 // Paints the content area for the layer, typically dirty rects submitted | 41 // Paints the content area for the layer, typically dirty rects submitted |
| 42 // through WebContentLayer::setNeedsDisplay, submitting drawing commands | 42 // through WebContentLayer::setNeedsDisplay, submitting drawing commands |
| 43 // through the WebCanvas. | 43 // through the WebCanvas. |
| 44 // The canvas is already clipped to the |clip| rect. | 44 // The canvas is already clipped to the |clip| rect. |
| 45 // Optionally, the implementation may set |opaque| to a rect covering pixels that | |
| 46 // the implementation knows are opaque. This information can be used for var ious | |
| 47 // optimizations. | |
|
Stephen Chennney
2015/02/03 17:15:23
This comment is referring to something that no lon
| |
| 48 // The |disableContext| enum controls most processing in | 45 // The |disableContext| enum controls most processing in |
| 49 // GraphicsContext to isolate the painting code in performance tests. | 46 // GraphicsContext to isolate the painting code in performance tests. |
| 50 virtual void paintContents(WebCanvas*, const WebRect& clip, GraphicsContextS tatus = GraphicsContextEnabled) = 0; | 47 virtual void paintContents(WebCanvas*, const WebRect& clip, GraphicsContextS tatus = GraphicsContextEnabled) = 0; |
| 51 | 48 |
| 52 virtual void paintContents(WebDisplayItemList*, const WebRect& clip, Graphic sContextStatus = GraphicsContextEnabled) = 0; | 49 // Temporary to enable Blink+Chromium commit. |
| 50 virtual void paintContents(WebDisplayItemList* list, const WebRect& clip, Gr aphicsContextStatus status = GraphicsContextEnabled) | |
| 51 { | |
| 52 paintContents(list, clip, false, status); | |
| 53 } | |
| 54 | |
| 55 // Paints the content area for the layer, typically dirty rects submitted | |
| 56 // through WebContentLayer::setNeedsDisplay, submitting drawing commands | |
| 57 // to populate the WebDisplayItemList. | |
| 58 // The |clip| rect defines the region of interest. The resulting WebDisplayI temList should contain | |
| 59 // sufficient content to correctly paint the rect, but may also contain othe r content. The result | |
| 60 // will be clipped on playback. | |
| 61 // The |clearCaches| flag specifies whether the WebItemDisplayList should re generate all | |
| 62 // content (when |clearCaches| is true) or is free to use cached content. It is only set true | |
| 63 // for performance testing. | |
| 64 // The |disableContext| enum controls most processing in GraphicsContext to isolate the painting | |
| 65 // code in performance tests. Current code always sets it to GraphicsContext Enabled. | |
| 66 virtual void paintContents( | |
| 67 WebDisplayItemList*, | |
| 68 const WebRect& clip, | |
| 69 const bool clearCaches = false, | |
|
chrishtr
2015/02/03 20:01:21
How about an enum { ShouldRespectPaintCache, Shoul
| |
| 70 GraphicsContextStatus = GraphicsContextEnabled) = 0; | |
| 53 | 71 |
| 54 protected: | 72 protected: |
| 55 virtual ~WebContentLayerClient() { } | 73 virtual ~WebContentLayerClient() { } |
| 56 }; | 74 }; |
| 57 | 75 |
| 58 } // namespace blink | 76 } // namespace blink |
| 59 | 77 |
| 60 #endif // WebContentLayerClient_h | 78 #endif // WebContentLayerClient_h |
| OLD | NEW |