| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_UTILITY_GRAPHICS_PAINT_AGGREGATOR_H_ | 5 #ifndef PPAPI_UTILITY_GRAPHICS_PAINT_AGGREGATOR_H_ |
| 6 #define PPAPI_UTILITY_GRAPHICS_PAINT_AGGREGATOR_H_ | 6 #define PPAPI_UTILITY_GRAPHICS_PAINT_AGGREGATOR_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 118 |
| 119 private: | 119 private: |
| 120 // This structure is an internal version of PaintUpdate. It's different in | 120 // This structure is an internal version of PaintUpdate. It's different in |
| 121 // two respects: | 121 // two respects: |
| 122 // | 122 // |
| 123 // - The scroll damange (area exposed by the scroll operation, if any) is | 123 // - The scroll damange (area exposed by the scroll operation, if any) is |
| 124 // maintained separately from the dirty rects generated by calling | 124 // maintained separately from the dirty rects generated by calling |
| 125 // InvalidateRect. We need to know this distinction for some operations. | 125 // InvalidateRect. We need to know this distinction for some operations. |
| 126 // | 126 // |
| 127 // - The paint bounds union is computed on the fly so we don't have to keep | 127 // - The paint bounds union is computed on the fly so we don't have to keep |
| 128 // a rectangle up-to-date as we do different operations. | 128 // a rectangle up to date as we do different operations. |
| 129 class InternalPaintUpdate { | 129 class InternalPaintUpdate { |
| 130 public: | 130 public: |
| 131 InternalPaintUpdate(); | 131 InternalPaintUpdate(); |
| 132 ~InternalPaintUpdate(); | 132 ~InternalPaintUpdate(); |
| 133 | 133 |
| 134 // Computes the rect damaged by scrolling within |scroll_rect| by | 134 // Computes the rect damaged by scrolling within |scroll_rect| by |
| 135 // |scroll_delta|. This rect must be repainted. It is not included in | 135 // |scroll_delta|. This rect must be repainted. It is not included in |
| 136 // paint_rects or in the rect returned by GetPaintBounds. | 136 // paint_rects or in the rect returned by GetPaintBounds. |
| 137 Rect GetScrollDamage() const; | 137 Rect GetScrollDamage() const; |
| 138 | 138 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 165 // important since there is typically some overhead in deciding what to | 165 // important since there is typically some overhead in deciding what to |
| 166 // paint. If your plugin is fast at doing these computations, raise this | 166 // paint. If your plugin is fast at doing these computations, raise this |
| 167 // threshold, if your plugin is slow, lower it (probably requires some | 167 // threshold, if your plugin is slow, lower it (probably requires some |
| 168 // tuning to find the right value). | 168 // tuning to find the right value). |
| 169 size_t max_paint_rects_; | 169 size_t max_paint_rects_; |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace pp | 172 } // namespace pp |
| 173 | 173 |
| 174 #endif // PPAPI_UTILITY_PAINT_AGGREGATOR_H_ | 174 #endif // PPAPI_UTILITY_PAINT_AGGREGATOR_H_ |
| OLD | NEW |