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

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
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
33 class WebDisplayItemList; 37 class WebDisplayItemList;
34 struct WebRect;
35 38
36 class BLINK_PLATFORM_EXPORT WebContentLayerClient { 39 class BLINK_PLATFORM_EXPORT WebContentLayerClient {
37 public: 40 public:
38 enum PaintingControlSetting { 41 enum PaintingControlSetting {
39 PaintDefaultBehavior, 42 PaintDefaultBehavior,
40 DisplayListConstructionDisabled, 43 DisplayListConstructionDisabled,
41 DisplayListCachingDisabled, 44 DisplayListCachingDisabled,
42 DisplayListPaintingDisabled 45 DisplayListPaintingDisabled
43 }; 46 };
44 47
45 // Paints the content area for the layer, typically dirty rects submitted 48 // Paints the content area for the layer, typically dirty rects submitted
46 // through WebContentLayer::setNeedsDisplayInRect, submitting drawing comman ds 49 // through WebContentLayer::setNeedsDisplayInRect, submitting drawing comman ds
47 // to populate the WebDisplayItemList. 50 // to populate the WebDisplayItemList.
48 // The |clip| rect defines the region of interest. The resulting WebDisplayI temList should contain 51 // The |recordingViewport| rect defines the region of interest. |recordingVi ewport| may be set by the callee to a
49 // sufficient content to correctly paint the rect, but may also contain othe r content. The result 52 // different value. The resulting WebDisplayItemList should contain
50 // will be clipped on playback. 53 // sufficient content to correctly paint the final value of |recordingViewpo rt|, but may also contain other content.
54 // The result will be clipped on playback to the final value of |recordingVi ewport|.
51 // The |PaintingControlSetting| enum controls painting to isolate different components in performance tests. 55 // The |PaintingControlSetting| enum controls painting to isolate different components in performance tests.
52 // Currently the DisplayListConstructionDisabled does nothing. 56 // Currently DisplayListConstructionDisabled does nothing.
53 virtual void paintContents( 57 virtual void paintContents(
54 WebDisplayItemList*, 58 WebDisplayItemList*,
55 const WebRect& clip, 59 gfx::Rect* recordingViewport,
56 PaintingControlSetting = PaintDefaultBehavior) = 0; 60 PaintingControlSetting = PaintDefaultBehavior) = 0;
57 61
58 // Returns an estimate of the current memory usage within this object, 62 // Returns an estimate of the current memory usage within this object,
59 // excluding memory shared with painting artifacts (i.e., 63 // excluding memory shared with painting artifacts (i.e.,
60 // WebDisplayItemList). Should be invoked after paintContents, so that the 64 // WebDisplayItemList). Should be invoked after paintContents, so that the
61 // result includes data cached internally during painting. 65 // result includes data cached internally during painting.
62 virtual size_t approximateUnsharedMemoryUsage() const { return 0; } 66 virtual size_t approximateUnsharedMemoryUsage() const { return 0; }
63 67
64 protected: 68 protected:
65 virtual ~WebContentLayerClient() { } 69 virtual ~WebContentLayerClient() { }
66 }; 70 };
67 71
68 } // namespace blink 72 } // namespace blink
69 73
70 #endif // WebContentLayerClient_h 74 #endif // WebContentLayerClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698