Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: public/platform/WebContentLayerClient.h

Issue 880653004: Blink side of changes to enable cache clearing without a flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Better use of enum. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebPopupMenuImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() { }
« no previous file with comments | « Source/web/WebPopupMenuImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698