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

Side by Side Diff: third_party/WebKit/public/platform/WebContentLayerClient.h

Issue 1452353002: Turn off computation of the interest rect in cc in synchronized paint mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « third_party/WebKit/Source/web/web.gyp ('k') | ui/compositor/layer.h » ('j') | 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 10 matching lines...) Expand all
21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef WebContentLayerClient_h 26 #ifndef WebContentLayerClient_h
27 #define WebContentLayerClient_h 27 #define WebContentLayerClient_h
28 28
29 #include "WebCommon.h" 29 #include "WebCommon.h"
30 30
31 namespace gfx {
32 class Rect;
33 }
34
31 namespace blink { 35 namespace blink {
32 36
37 struct WebRect;
33 class WebDisplayItemList; 38 class WebDisplayItemList;
34 struct WebRect;
35 39
36 class BLINK_PLATFORM_EXPORT WebContentLayerClient { 40 class BLINK_PLATFORM_EXPORT WebContentLayerClient {
37 public: 41 public:
38 enum PaintingControlSetting { 42 enum PaintingControlSetting {
39 PaintDefaultBehavior, 43 PaintDefaultBehavior,
40 DisplayListConstructionDisabled, 44 DisplayListConstructionDisabled,
41 DisplayListCachingDisabled, 45 DisplayListCachingDisabled,
42 DisplayListPaintingDisabled 46 DisplayListPaintingDisabled
43 }; 47 };
44 48
49 virtual gfx::Rect paintableRegion() = 0;
50
45 // Paints the content area for the layer, typically dirty rects submitted 51 // Paints the content area for the layer, typically dirty rects submitted
46 // through WebContentLayer::setNeedsDisplayInRect, submitting drawing comman ds 52 // through WebContentLayer::setNeedsDisplayInRect, submitting drawing comman ds
47 // to populate the WebDisplayItemList. 53 // to populate the WebDisplayItemList.
48 // The |clip| rect defines the region of interest. The resulting WebDisplayI temList should contain 54 // The |clip| rect defines the region of interest. The resulting WebDisplayI temList should contain
49 // sufficient content to correctly paint the rect, but may also contain othe r content. The result 55 // sufficient content to correctly paint the rect, but may also contain othe r content. The result
50 // will be clipped on playback. 56 // will be clipped on playback.
51 // The |PaintingControlSetting| enum controls painting to isolate different components in performance tests. 57 // The |PaintingControlSetting| enum controls painting to isolate different components in performance tests.
52 // Currently the DisplayListConstructionDisabled does nothing. 58 // Currently the DisplayListConstructionDisabled does nothing.
53 virtual void paintContents( 59 virtual void paintContents(
54 WebDisplayItemList*, 60 WebDisplayItemList*,
55 const WebRect& clip, 61 const WebRect& clip,
56 PaintingControlSetting = PaintDefaultBehavior) = 0; 62 PaintingControlSetting = PaintDefaultBehavior) = 0;
57 63
58 // Returns an estimate of the current memory usage within this object, 64 // Returns an estimate of the current memory usage within this object,
59 // excluding memory shared with painting artifacts (i.e., 65 // excluding memory shared with painting artifacts (i.e.,
60 // WebDisplayItemList). Should be invoked after paintContents, so that the 66 // WebDisplayItemList). Should be invoked after paintContents, so that the
61 // result includes data cached internally during painting. 67 // result includes data cached internally during painting.
62 virtual size_t approximateUnsharedMemoryUsage() const { return 0; } 68 virtual size_t approximateUnsharedMemoryUsage() const { return 0; }
63 69
64 protected: 70 protected:
65 virtual ~WebContentLayerClient() { } 71 virtual ~WebContentLayerClient() { }
66 }; 72 };
67 73
68 } // namespace blink 74 } // namespace blink
69 75
70 #endif // WebContentLayerClient_h 76 #endif // WebContentLayerClient_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/web.gyp ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698