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

Side by Side 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, 10 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 unified diff | Download patch
« no previous file with comments | « Source/web/WebPopupMenuImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19 matching lines...) Expand all
30 #include "WebCommon.h" 30 #include "WebCommon.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class WebDisplayItemList; 34 class WebDisplayItemList;
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 enum PaintingControlSetting { PaintDefaultBehavior, DisplayListConstructionD isabled, DisplayListCachingDisabled };
41
42 // Temporary until we rename the GraphicsContextStatus on the chromium side.
43 void paintContents(WebCanvas* canvas, const WebRect& clip, GraphicsContextSt atus status = GraphicsContextEnabled)
44 {
45 paintContents(canvas, clip,
46 status == GraphicsContextEnabled ? PaintDefaultBehavior : DisplayLis tConstructionDisabled);
47 }
48
49 // Temporary until we rename the GraphicsContextStatus on the chromium side.
50 void paintContents(
51 WebDisplayItemList* itemList,
52 const WebRect& clip,
53 GraphicsContextStatus status = GraphicsContextEnabled)
54 {
55 paintContents(itemList, clip,
56 status == GraphicsContextEnabled ? PaintDefaultBehavior : DisplayLis tConstructionDisabled);
57 }
40 58
41 // Paints the content area for the layer, typically dirty rects submitted 59 // Paints the content area for the layer, typically dirty rects submitted
42 // through WebContentLayer::setNeedsDisplay, submitting drawing commands 60 // through WebContentLayer::setNeedsDisplay, submitting drawing commands
43 // through the WebCanvas. 61 // through the WebCanvas.
44 // The canvas is already clipped to the |clip| rect. 62 // The canvas is already clipped to the |clip| rect.
45 // Optionally, the implementation may set |opaque| to a rect covering pixels that 63 // The |PaintingControlSetting| enum controls painting to isolate different components in performance tests.
46 // the implementation knows are opaque. This information can be used for var ious 64 virtual void paintContents(WebCanvas*, const WebRect& clip, PaintingControlS etting = PaintDefaultBehavior) = 0;
47 // optimizations.
48 // The |disableContext| enum controls most processing in
49 // GraphicsContext to isolate the painting code in performance tests.
50 virtual void paintContents(WebCanvas*, const WebRect& clip, GraphicsContextS tatus = GraphicsContextEnabled) = 0;
51 65
52 virtual void paintContents(WebDisplayItemList*, const WebRect& clip, Graphic sContextStatus = GraphicsContextEnabled) = 0; 66 // Paints the content area for the layer, typically dirty rects submitted
67 // through WebContentLayer::setNeedsDisplayInRect, submitting drawing comman ds
68 // to populate the WebDisplayItemList.
69 // The |clip| rect defines the region of interest. The resulting WebDisplayI temList should contain
70 // sufficient content to correctly paint the rect, but may also contain othe r content. The result
71 // will be clipped on playback.
72 // The |PaintingControlSetting| enum controls painting to isolate different components in performance tests.
73 // Currently the DisplayListConstructionDisabled does nothing.
74 virtual void paintContents(
75 WebDisplayItemList*,
76 const WebRect& clip,
77 PaintingControlSetting = PaintDefaultBehavior) = 0;
53 78
54 protected: 79 protected:
55 virtual ~WebContentLayerClient() { } 80 virtual ~WebContentLayerClient() { }
56 }; 81 };
57 82
58 } // namespace blink 83 } // namespace blink
59 84
60 #endif // WebContentLayerClient_h 85 #endif // WebContentLayerClient_h
OLDNEW
« 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