OLD | NEW |
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // The paintable region is the rectangular region, within the bounds of the
layer | 49 // The paintable region is the rectangular region, within the bounds of the
layer |
50 // this client paints, that the client is capable of painting via paintConte
nts(). | 50 // this client paints, that the client is capable of painting via paintConte
nts(). |
51 // Calling paintContents will return a WebDisplayitemList that is guaranteed
valid | 51 // Calling paintContents will return a WebDisplayitemList that is guaranteed
valid |
52 // only within this region. | 52 // only within this region. |
53 // In particular, this is used to represent the interest rect in Blink. | 53 // In particular, this is used to represent the interest rect in Blink. |
54 virtual gfx::Rect paintableRegion() = 0; | 54 virtual gfx::Rect paintableRegion() = 0; |
55 | 55 |
56 // Paints the content area for the layer, typically dirty rects submitted | 56 // Paints the content area for the layer, typically dirty rects submitted |
57 // through WebContentLayer::setNeedsDisplayInRect, submitting drawing comman
ds | 57 // through WebContentLayer::setNeedsDisplayInRect, submitting drawing comman
ds |
58 // to populate the WebDisplayItemList. | 58 // to populate the WebDisplayItemList. |
59 // The |clip| rect defines the region of interest. The resulting WebDisplayI
temList should contain | |
60 // sufficient content to correctly paint the rect, but may also contain othe
r content. The result | |
61 // will be clipped on playback. | |
62 // The |PaintingControlSetting| enum controls painting to isolate different
components in performance tests. | 59 // The |PaintingControlSetting| enum controls painting to isolate different
components in performance tests. |
63 // Currently the DisplayListConstructionDisabled does nothing. | 60 // Currently the DisplayListConstructionDisabled does nothing. |
64 virtual void paintContents( | 61 virtual void paintContents( |
65 WebDisplayItemList*, | 62 WebDisplayItemList*, |
66 const WebRect& clip, | |
67 PaintingControlSetting = PaintDefaultBehavior) = 0; | 63 PaintingControlSetting = PaintDefaultBehavior) = 0; |
68 | 64 |
69 // Returns an estimate of the current memory usage within this object, | 65 // Returns an estimate of the current memory usage within this object, |
70 // excluding memory shared with painting artifacts (i.e., | 66 // excluding memory shared with painting artifacts (i.e., |
71 // WebDisplayItemList). Should be invoked after paintContents, so that the | 67 // WebDisplayItemList). Should be invoked after paintContents, so that the |
72 // result includes data cached internally during painting. | 68 // result includes data cached internally during painting. |
73 virtual size_t approximateUnsharedMemoryUsage() const { return 0; } | 69 virtual size_t approximateUnsharedMemoryUsage() const { return 0; } |
74 | 70 |
75 protected: | 71 protected: |
76 virtual ~WebContentLayerClient() { } | 72 virtual ~WebContentLayerClient() { } |
77 }; | 73 }; |
78 | 74 |
79 } // namespace blink | 75 } // namespace blink |
80 | 76 |
81 #endif // WebContentLayerClient_h | 77 #endif // WebContentLayerClient_h |
OLD | NEW |