| Index: public/platform/WebContentLayerClient.h
|
| diff --git a/public/platform/WebContentLayerClient.h b/public/platform/WebContentLayerClient.h
|
| index 552fe576d02d427ff52d36b4a88fec6b5c680e79..2836b2541f5fb682ea1d94f7dc6c9c3e9332fa11 100644
|
| --- a/public/platform/WebContentLayerClient.h
|
| +++ b/public/platform/WebContentLayerClient.h
|
| @@ -37,19 +37,44 @@ struct WebRect;
|
| class BLINK_PLATFORM_EXPORT WebContentLayerClient {
|
| public:
|
| enum GraphicsContextStatus { GraphicsContextEnabled, GraphicsContextDisabled };
|
| + enum PaintingControlSetting { PaintDefaultBehavior, DisplayListConstructionDisabled, DisplayListCachingDisabled };
|
| +
|
| + // Temporary until we rename the GraphicsContextStatus on the chromium side.
|
| + void paintContents(WebCanvas* canvas, const WebRect& clip, GraphicsContextStatus status = GraphicsContextEnabled)
|
| + {
|
| + paintContents(canvas, clip,
|
| + status == GraphicsContextEnabled ? PaintDefaultBehavior : DisplayListConstructionDisabled);
|
| + }
|
| +
|
| + // Temporary until we rename the GraphicsContextStatus on the chromium side.
|
| + void paintContents(
|
| + WebDisplayItemList* itemList,
|
| + const WebRect& clip,
|
| + GraphicsContextStatus status = GraphicsContextEnabled)
|
| + {
|
| + paintContents(itemList, clip,
|
| + status == GraphicsContextEnabled ? PaintDefaultBehavior : DisplayListConstructionDisabled);
|
| + }
|
|
|
| // Paints the content area for the layer, typically dirty rects submitted
|
| // through WebContentLayer::setNeedsDisplay, submitting drawing commands
|
| // through the WebCanvas.
|
| // The canvas is already clipped to the |clip| rect.
|
| - // Optionally, the implementation may set |opaque| to a rect covering pixels that
|
| - // the implementation knows are opaque. This information can be used for various
|
| - // optimizations.
|
| - // The |disableContext| enum controls most processing in
|
| - // GraphicsContext to isolate the painting code in performance tests.
|
| - virtual void paintContents(WebCanvas*, const WebRect& clip, GraphicsContextStatus = GraphicsContextEnabled) = 0;
|
| -
|
| - virtual void paintContents(WebDisplayItemList*, const WebRect& clip, GraphicsContextStatus = GraphicsContextEnabled) = 0;
|
| + // The |PaintingControlSetting| enum controls painting to isolate different components in performance tests.
|
| + virtual void paintContents(WebCanvas*, const WebRect& clip, PaintingControlSetting = PaintDefaultBehavior) = 0;
|
| +
|
| + // Paints the content area for the layer, typically dirty rects submitted
|
| + // through WebContentLayer::setNeedsDisplayInRect, submitting drawing commands
|
| + // to populate the WebDisplayItemList.
|
| + // The |clip| rect defines the region of interest. The resulting WebDisplayItemList should contain
|
| + // sufficient content to correctly paint the rect, but may also contain other content. The result
|
| + // will be clipped on playback.
|
| + // The |PaintingControlSetting| enum controls painting to isolate different components in performance tests.
|
| + // Currently the DisplayListConstructionDisabled does nothing.
|
| + virtual void paintContents(
|
| + WebDisplayItemList*,
|
| + const WebRect& clip,
|
| + PaintingControlSetting = PaintDefaultBehavior) = 0;
|
|
|
| protected:
|
| virtual ~WebContentLayerClient() { }
|
|
|