OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 PDF_PAINT_AGGREGATOR_H_ | 5 #ifndef PDF_PAINT_AGGREGATOR_H_ |
6 #define PDF_PAINT_AGGREGATOR_H_ | 6 #define PDF_PAINT_AGGREGATOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ppapi/cpp/image_data.h" | 10 #include "ppapi/cpp/image_data.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 private: | 84 private: |
85 // This structure is an internal version of PaintUpdate. It's different in | 85 // This structure is an internal version of PaintUpdate. It's different in |
86 // two respects: | 86 // two respects: |
87 // | 87 // |
88 // - The scroll damange (area exposed by the scroll operation, if any) is | 88 // - The scroll damange (area exposed by the scroll operation, if any) is |
89 // maintained separately from the dirty rects generated by calling | 89 // maintained separately from the dirty rects generated by calling |
90 // InvalidateRect. We need to know this distinction for some operations. | 90 // InvalidateRect. We need to know this distinction for some operations. |
91 // | 91 // |
92 // - The paint bounds union is computed on the fly so we don't have to keep | 92 // - The paint bounds union is computed on the fly so we don't have to keep |
93 // a rectangle up-to-date as we do different operations. | 93 // a rectangle up to date as we do different operations. |
94 class InternalPaintUpdate { | 94 class InternalPaintUpdate { |
95 public: | 95 public: |
96 InternalPaintUpdate(); | 96 InternalPaintUpdate(); |
97 ~InternalPaintUpdate(); | 97 ~InternalPaintUpdate(); |
98 | 98 |
99 // Computes the rect damaged by scrolling within |scroll_rect| by | 99 // Computes the rect damaged by scrolling within |scroll_rect| by |
100 // |scroll_delta|. This rect must be repainted. It is not included in | 100 // |scroll_delta|. This rect must be repainted. It is not included in |
101 // paint_rects. | 101 // paint_rects. |
102 pp::Rect GetScrollDamage() const; | 102 pp::Rect GetScrollDamage() const; |
103 | 103 |
(...skipping 17 matching lines...) Expand all Loading... |
121 | 121 |
122 // Internal method used by InvalidateRect. If |check_scroll| is true, then the | 122 // Internal method used by InvalidateRect. If |check_scroll| is true, then the |
123 // method checks if there's a pending scroll and if so also invalidates |rect| | 123 // method checks if there's a pending scroll and if so also invalidates |rect| |
124 // in the new scroll position. | 124 // in the new scroll position. |
125 void InvalidateRectInternal(const pp::Rect& rect, bool check_scroll); | 125 void InvalidateRectInternal(const pp::Rect& rect, bool check_scroll); |
126 | 126 |
127 InternalPaintUpdate update_; | 127 InternalPaintUpdate update_; |
128 }; | 128 }; |
129 | 129 |
130 #endif // PDF_PAINT_AGGREGATOR_H_ | 130 #endif // PDF_PAINT_AGGREGATOR_H_ |
OLD | NEW |